The Java language is closely related to the Java VM. The language has extra constraints for the programmer's safety (e.g. add checked exceptions, hide 'goto'), but the basic imperative, pseudo-OO computational model is shared. For example, compare the invocation modes in JLS 15.12.3/4 with the invoke* instructions in the JVMS. Also see slide 18 of http://blogs.sun.com/abuckley/resource/Devoxx2008-TowardsAUniversalVM.pdf.
The Java language is valuable for the same reason the Java VM is valuable - they both get the job done with simple, direct constructs. Where a source language adds a significantly more sophisticated type system, it can either translate down to the VM's simpler model (frequent; e.g. enums in Java) or extend the VM's model (infrequent; strongly-typed dynamic invocation in 292). Alex On Jul 26, 7:12 pm, Reinier Zwitserloot <[email protected]> wrote: > And with the 'java is close to the bytecode' again. > > No, it isn't. Java is one of the farthest removed languages from the > bytecode. The relationship Assembler->C is fundamentally NOT the same > as the relationship JVM Bytecode -> Java! > > Wanna throw a checked exception out of a method that doesn't declare > it? You can do this on the bytecode level. Scala can do it. Java > cannot. > > Wanna 'goto'? The JVM can do it. No language built on the JVM language > can, however. Well, maybe some brave soul will port the latest PHP > version, which has goto in it, for some reason. > > Or, flip it around: What exactly can java do that scala can't? > > That's NOT the reason why java (the language) ought to stick around. > It ought to stick around because it offers a useful philosophy that > none of the other languages on the JVM currently have. > > On Jul 26, 9:07 pm, Frederic Simon <[email protected]> wrote: > > > I think Java is more like C, and Scala like C++: > > - C is the base workhorse of low level modules (close to the metal - all the > > metal there is) > > - Java is the base workhorse of the JVM (close to the bytecode) > > - C++ is an OO layer on top of C (that will disappear slowly as an > > historical aberration) > > - Scala is a functional layer on top of Java/JVM (that wil .... :) > > > On Sat, Jul 25, 2009 at 2:01 AM, Reinier Zwitserloot > > <[email protected]>wrote: > > > > I think your scala hobbying is leaking through a bit too much, Dick. > > > > Okay, scala might be an interesting take on a future java. In what > > > possible universe does this mean 'let's just leave java as is and do > > > no more work on it' is the appropriate thing to do? You yourself > > > compared java to C++ which is still adding major new features, and > > > it's got a loooong headstart on java. > > > -- > > JFrog Ltd > > 5 Habonim st., P.O.Box 8187 > > Netanya, Israel 42504. > > Tel: +972 9 8941444 > > Fax: +972 9 > > 8659977http://www.jfrog.org/http://freddy33.blogspot.com/http://nothingisinf... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
