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

Re: FW: OT: Why is C so popular?



Alphonse Ogulla <ogulla@uonbi.ac.ke> writes:

> C, Erlang, Prolog, Perl, Python and C++ are all refered to in the above 
> paragraph. Java is conspicuouly not mentioned. I construe that to mean Java 
> is so much lacking in useful qualities to serve any practical purpose.

Java is garbage-collected, and doesn't have a syntactically explicit
notion of pointers or references.  This is actually fairly important
to me: the big reason I don't use C++ (aside from it having mutated
into something unrecognizable since I learned it 10 years ago) is that
I can't think about object lifetimes successfully, and don't want to
leak memory.  Java saves me from doing that.  Does calling f(o) make a
copy of the object o?  In C++, it depends on whether f() takes a
reference parameter or not; in Java, the answer is always "no".  (The
downside is that making a deep copy of an object is a pain.)

C++'s big benefit on GNU/Linux, though, is that there are good
runtimes that are Free.  I've never had good luck using a JVM or class
library besides Sun's.  This isn't a problem since I work in academia
right now, but I could see it being an issue in industry.  For Java,
maintaining a CLASSPATH is also a big pain.  But Java is what I'm
using right now, and I think I'm kind of glad that it's not C++.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: