3 ms·
it would have been better if you had never implemented the feature. And now it would be better now if you take these changes off your web site, and don't menti
by gaius 18y ago
it would have been better if you had never implemented the feature. And now it would be better now if you take these changes off your web site, and don't mention that they exist
This is from 2001 - Java is Open Source now... I'd be interested to know how this story ended, since AFAIK this feature is missing in present-day GCC.
- rms 18y agoSome more recent discussion in the comments here http://www.jnode.org/node/1067 http://www.jnode.org/node/1067
- michaelneale 18y agoAn interesting comment to me is: "The problem is that C and C++ are based on the model that a program can access any memory cell, and can cast between pointer-sized scalars and pointers at will. This is fundamentally at odds with the execution model defined by the JVM." So it is (obviously) not really that useful an idea, other then perhaps as a curious or academic excercise (not terribly practical).
- aggieben 18y agoIt's not hard to write portable C++ code that doesn't cast pointers, and it's really not that hard to write C++ that doesn't "touch" memory cells. Being able to access the Java class library and 3rd party APIs from C++ could be very useful.
- michaelneale 18y agoOh no question, I know java very well, C well and C++ not at all, so maybe I am basing what I think of C++ as C, but I haven't really been able to do much interesting in C without extensive use of pointers (with the exception of my thesis project, although in that case it was interspersed with chunks of #asm - so it wasn't a good candidate either ;). Wouldn't it look rather like java though?
- aggieben 18y agoNot really, especially if you used templates.