S
Steven T. Hatton
Severin said:i'm not quite sure what you mean by "byte compile". compilation is simply
the translation from source to destination language. did you generate
native code? this does not prove my argument senseless. i'm obviously not
the java-guru (and i don't really know what features, classes,.. the
java-standard supports),
I didn't propose any language feature from Java should be included in C++.
I merely used the compilation of the Java compiler and the associated Java
libraries as an example of a large body of code written in a language that
does not have a preprocessor. Yes, the compiler is written in C and
perhaps C++.
http://gcc.gnu.org/java/
"GCJ is a portable, optimizing, ahead-of-time compiler for the Java
Programming Language. It can compile:
* Java source code directly to native machine code,
* Java source code to Java bytecode (class files),
* and Java bytecode to native machine code.
"
but there will be a great loss of functionality
if you want to use the same java program on a windowing system and on a
console system (there you go,.. implementing 2 versions, only, of course
if the java compiler isn't smart enough to change all the windowing code
to console code).
C++ compilers can't do what you are describing. If you are suggesting the
program should sense whether it is running in a windowing or console
environment, that's a programming, and system issue, not a language
specific one.
as i said before,. i don't think portability really is an argument here.
and i think it would be better to discuss missing features and not "java
has this and that, why doesn't c++"
I was using Java as a counter example to demonstrate that certain
functionality can be achieved without the C preprocessor. I've already
mentioned a feature C++ doesn't have, but I believe it should have.
The Standard should specify a means of resolving names to locate
declarations outside the current file based on native C++ syntax, and not
dependent on the preprocessor.
so what? should everybody just drop C and start low-level programming in
java? and as for the quote anyway,.. i thought you wanted to change C++
not C? this whole thread really smells trolling....
The point was that I know the difference between byte compiled code running
on a VM, and natively compiled code. I really wish people would stop
responding irrationally every time Java is mentioned in a discussion of
C++.