David R. MacIver's Blog
Goto
Hm. Java byte code has a goto, and goto is already a reserved word in Java. Now that javac is open source, I wonder how much work adding goto to Java would be?
Note because it’s a good idea or anything. Simply out of pure malice. :-)
Comments
Wilf on 2007-07-04 14:53:00:
While trying to convert a Fortran application ( a large complicated
monster of an app.) I stumbled across the many gotos.
The solution, I created a Goto class to extend and then a GotoLoader
that does bytecode modification on the class at run time.
The class is error-proof since the base class immediately crashes if not
converted (a asafety feature) and the gotos supported also include the
famed MS FORTRAN 5.1 multi-goto where the goto has more than one label
and jumps based on an index variable.
It jumps into,outof, around, as expected of a real goto implementation
and its very fast since its in bytecode.
The link on my blog is:
http://coresoft.blogspot.com/2007/07/using-jumps-and-gotos-in-java-programs.html