5 ms·
An 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-
by michaelneale 18y ago
An 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.