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

Re: Java




Sorry for all the posts tonight; I'm busy avoiding work :-)

> Date: Fri, 7 Dec 2001 20:07:47 -0400
> From: shivers@cc.gatech.edu
> 
[snip]
> For the record: I think Java *rocks*. It's one of the best things to
> happen to the industry in a long while.
> 
> I see Java and I see hope that most industry programmers will be able to
> program without having to use C or, worse, C++. I hope that C++ will just
> wither away, and that C will become marginalised to niches like device
> drivers. I like C. But it is the wrong language for most of the applications
> for which it is used.

Java certainly has lots of nice features, but I think you're being too hard
on C++.  C++ has one feature that blows java away for performance-critical
applications: you can define your own data structures at almost the machine
level.  Try implementing your own resizable array class in java and see how
efficient it is.  There's no realloc for changing the size of the array;
you have to build a whole new array and copy the contents of the old one
into it.

What I think C++ needs (and this is getting pretty far off-topic, sorry) is
to have some kind of standardized optional garbage collection libraries.
This could make 90+% of C++ coding much easier.

I agree what you say about C, though.  IMO C should be restricted to:

-- writing code that has to interface directly with the machine
-- implementing better languages :-)

Mike