News for hackers. Stuff that matters.
Re:What features of Java have been dropped in Scala? by flocial on Tuesday August 09, 2011 @09:12AM (#2863836)
How does Scala drop these from the JVM?
Re:What features of Java have been dropped in Scala? by jmreardon on Tuesday August 09, 2011 @09:29AM (#2863893)
Java and the JVM are not the same thing. Java is a programming language. The JVM is a stack-based virtual machine that executes Java bytecode. Java bytecode is what Java compiles into (ie. the contents of .class files).

As it happens, the JVM can't tell if a .class file was generated from compiling Java code, or handwritten, or generated from another programming language altogether. As long as the class file is valid, the JVM will run it. In the case of Scala, "continue" isn't in the language, so bytecode that performs the operation is never generated by scalac. In fact, "break" and "continue" don't even have any meaning at the JVM level. Java bytecode works at the level of gotos and conditional branches.