[plug] Uni Course - UWA or Curtin?

Greg Mildenhall assassin at live.wasp.net.au
Tue Nov 20 09:21:06 WST 2001


On Mon, 19 Nov 2001, Jonathon Bates wrote:
> > I can't even begin to imagine what you see in C++ over Java. (unless what
> > you really mean is that you prefer C to Java) I'd love to hear your
> > opinions.

> We dont have to rely fully on the garbage collector. I can destruct my
> own object as i feel free, rather than when the compiler feels free.

Aaaah, programmer hubris. :)

The garbage collector doesn't make mistakes - no crashes, no leaks. The
garbage collector can make decisions based on a wealth of information you
don't (and sometimes can't) have. The garbage collector outpaces you by
doing deallocation as a job lot and reaping the instruction-cache
benefits. The garbage collector compacts data on-the-fly, significantly
enhancing the effectiveness of the data-cache.

What makest thou think thy puny deallocation code canst match the wisdom
of the mighty garbage collector, foolish mortal?

> C++ is a heck of a lot faster than Java. 

So is your hardware too slow, or are your algorithms too inefficient? :)

> The only 2 advantages i can seein java is that it is machine independant,
> and it is easier to learn.
> But thats it....
> Thougths?

Stronger*, far cleaner OO model. Modularized code blocks. Memory
protection. Proper OO library design with superb documentation. A language
standard that is fully implemented in a real compiler implementation. (in
fact most of them!) Integrated concurrency primitives. Transparent RMI.

Actually, I loathe them both, but I can't think of a single advantage to
C++, unless you are in a problem domain that is basically on its knees
begging you to use C, in which case why don't you? :)

-Greg

* I miss the generics, but C++ generics are a joke anyway.




More information about the plug mailing list