[M3devel] bandwith

Rodney M. Bates rodney_bates at lcwb.coop
Sun Mar 14 16:58:21 CET 2010



Dirk Muysers wrote:
>  
> To make it work for all these different platforms seems a herculean task 
> and rather pointless
> endeavour. Why not use all that energy to try a radically disruptive 
> strategy such as a platform
> agnostic intermediate form targeting a JIT.
>  

I have been a little way down this road at least three times, with at
least two different languages, and it turns out not to be what it would
appear at first glance, at least for the JVM.

Java is a mostly object-oriented language, meaning the non-object-oriented
types and operations are very limited.  Most of the interesting stuff can
be done only with full-blown heap allocated objects and dispatching methods.
Even the equivalents of records and arrays are this way inb Java.  When you
don't need this full generality and power, you pay big performance penalties
for heap allocation, and this is worse and much deeper than the
performance penalties of an interpretive implementation. (which, of
course, a JIT code generator partially avoids, and a traditional
source-to-machine compiler avoids altogether, all with no language
changes.)

Many languages, Modula-3 included, give this generality for when you need
it, but also give you lighter weight alternatives, for use when appropriate.

So when you try to implement some other language using JVM, you soon
discover that JVM lacks a lot of operations needed for the not-so-
impoverished non-object-oriented types of the language.

Whether or how badly the .net/mono virtual machine suffers from this, I
don't know.  It apparently was designed to support a much wider range
of languages, but I seem to recall hearing some discussions that suggested
it had some of the same limitations.

Of course, we could invent our own virtual machine (M-code? MVM?) ;-).

This whole approach is of course, not very suitable for systems programming,
one of Modula-3's strengths.



> d. muysers



More information about the M3devel mailing list