[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (OT) Re: memory management







>That's C++ for you! Some would think that Smalltalk and Java cheat at
>this (you can change a parent class without recompiling the childrens)
>by being partly interpreted, but ObjC does it too and its compiled, so
>(to borrow some of my Quadra non-customers) C++ must be broken. :-)

Erm. Objective C is essentially run-time interpreting a lot of stuff.

Java in fact is even closer to the C++ model, it just dynamically links things a
lot later... the interpretation is not done at the C++-like level but at an
opcode level. The machine independent part of Java is actually a stack-based
engine with 200 and something opcodes. I thought it was quite elegant at that
point, and should be pretty nippy. Layerering a billion lines of OO crud on it
hasn't helped the speed.

You could probably solve the problem in C++ by just compiling each class into a
separate library and dynamically linking them just before running.