Article View: comp.lang.java
Article #3Re: C++ and Java
From: Nelson Yu
Date: Fri, 06 Oct 1995 19:19
Date: Fri, 06 Oct 1995 19:19
60 lines
2494 bytes
2494 bytes
J. F. Goodwin (smrgoodw@reading.ac.uk) wrote: : Having only recently discovered the concept of object-oriented programming : I have been studying in my spare time the mechanics of C++. Now I discover : that there is Java which is claimed to be superior by targeting many of : C++ weaknesses. : Those who have fair experience of C++ and Java - could they tell me what : they think of the two languages in relation to each other? I'm keeping : an open mind. I'm not asking for any statements like "C++ is more popular : in industry therefore use C++" I'm interested in the strengths and : weaknesses in both as languages. I'd like to come to my own conclusions : the problem is Java doesn't seem to be every where you turn unlike C++. : I've browsed through the White Paper on the WWW but I'm interested in : experiences. : E-mail me if you wish, but I'd be happier to see a discussion go on. : - Jg : J.F.Goodwin@reading.ac.uk Sorry If I sent you empty messages, I forget to save them in the temp file to be posted. C++ has 1) Operator overloading 2) Multiple Inheritance 3) A large collection algoritms and data structures in the STL(Standard Template Library) 4) Functions 5) Pointers (These two are not necessarily that good) 6) Templates(aka parameterized types) 7) Is being ANSIed 8) Speed Java has 1) Interfaces 2) Garabage collection 3) A portable GUI library. 4) A nice class hierarchy(i.e everything is derived from object) 5) Internet-aware 6) Security 7) Distributed 8) Implements threading nicely 9) Interpreted 10) Runs on a Virtual Machine 11) Sun is currently the only implementor of a compiler and interpreter. Both have 1) Classes 2) Polymorphism 3) RTTI(Run-Time Type Information) or Object identity. Java does it better 4) Compatibility with C. 5) Can be compiled These features may or may not be desirable depending on whom you ask... Note: The above are the things that popped into my head, of course there is more...
Technical Details
Message-ID:
<453vg1$d7j@scapa.cs.ualberta.ca>Path:
arc1-ca.pugleaf.net!rover.ucs.ualberta.ca!alberta!nelsonReferences:
<4535bv$cfr@susscsc1.rdg.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rover.ucs.ualberta.ca!alberta!nelson From: nelson@scapa.cs.ualberta.ca (Nelson Yu) Newsgroups: comp.lang.java,comp.lang.c++ Subject: Re: C++ and Java Followup-To: comp.lang.java,comp.lang.c++ Date: 6 Oct 1995 19:19:29 GMT Organization: Computing Science, U of Alberta, Edmonton, Canada Message-ID: <453vg1$d7j@scapa.cs.ualberta.ca> References: <4535bv$cfr@susscsc1.rdg.ac.uk> NNTP-Posting-Host: falun.cs.ualberta.ca X-Newsreader: TIN [version 1.2 PL2]