A transient (slightly off-topic) thought on the way from
C++ to Java.... I was wondering whether there is an attempt
to implement a free javac?
Thought: the JVM defines the bytecodes. For portability,
it is not an issue which language was used to generate
the bytecode. Now, rather then using c2java or cpp2java
steps, I am wondering about small extensions to the Java
language. Runtime issues (like "signed") won't work, but
compile time issues would.
Example: "const". A const qualifier on call-by-reference
parameters and reference returns could be checked at
compile time. It is not perfect (your bytecode, w/o any
const qualifier in signatures, might run with other bytecode that will
not be aware of any restrictions on your accessor methods
etc.), but it is a huge step, at the expense of having
to remove a single keyword with a filter prior to compiling
it with javac.
GNU gcc had certain extensions enabled by compiler command
options, used for not-yet-ANSI and experimental features,
like signatures. Maybe some of the gcc C++ parser code
could actually be used as a start? This is not about
optimizing or JIT or creating native code from Java source
or bytecode, but those might be other potential benefits.
b.