2012-03-07

Is there a "C for JVM"?

The accusation that C is "structured assembly language" has merit. It is not hard for a competent developer to map C to CISC assembly, running the compiler in his head.  This is not a weakness, it is a strength, and is the reason why it remains a tool of choice when performance and size count.

As near as I can easily see, nobody has designed an equivalent language for the JVM.  Something that maps the language constructs closely and clearly to the underlying semantics of the actual procedural execution model.  With no "object code blowups", where doing some small change to the source causes a massive inflation of object code side.

Does such a language exist?

(BTW, the Java language itself is not it.)

Any random CS masters student can design a language that abstracts away an underlying reality.   A few rare and gifted language designers can do it well. But it takes a rare genius to embrace and clarify an underlying reality, and make it approachable and useful.

2 comments:

  1. I remember seeing such a thing many years ago: Must have been Java 1.1 era. From what I remember, it was mostly conforming C except with a few quirks to work around JVMisms (method size limits, etc).
    I recall that it came with a modified Doom source for demonstration.

    ReplyDelete
  2. I was thinking of C-ish syntax myself.

    The big two differences are going to be references instead of pointers, and GC instead of malloc/free.

    ReplyDelete