Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26150
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java vs C++ |
| Date | 2011-02-05 10:49 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <iijrj2$i0g$1@news.eternal-september.org> (permalink) |
| References | <iijbfr$pb2$1@lust.ihug.co.nz> |
On 02/05/2011 06:15 AM, Lawrence D'Oliveiro wrote: > In the beginning, Java was supposed to be a much simpler language than C++, > in some sense leaving out all the unnecessary complications, while keeping > the worthwhile parts. > > This PDF copy of “The Java Language Specification”, 3rd Edition, that I’m > currently reading, has 684 pages. By comparison, the paper copy of “The C++ > Standard” on my bookshelf has 782 numbered pages. As you can see, Java is no > longer that far off C++ in complexity. My copy of the C++0x draft reference standard, i.e. the copy sent out for a ballot by national bodies, consisted of no fewer than 1300 numbered pages. Also take into consideration the fact that the C++ standard does not try to pin stuff down into unambiguous interoperable statements, e.g., a precise size definition for size_t. Java, on the other hand, goes so far as to fully define the language character set, a longish, detailed, accessible expose on the threading memory model that takes up 30 pages, while C++ spends 3 pages on it and still leaves me wondering what memory is guaranteed to be visible after certain operations. So 684 pages of well-written, easily-understood text is not nearly as complex as 1300 pages of dense, example-lacking specification text. Maybe that's why popular C++ compilers have many more compatibility problems than popular Java compilers? Your statement is not up to date. > Most of that complexity seems to be caused by the addition of generics to > Java. This was something that C++ had from the beginning. It was one of the > unnecessary complications that Java left out to start with. But now they’ve > changed their minds, and put it back in. But since they need to be backward- > compatible with existing code, they’ve had to add extra complications that > C++ never had to deal with. You sir have probably never met the full pain of template metaprogramming. Indeed, templates is probably the single least well-supported thing in C++. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
Re: Java vs C++ Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-05 10:49 -0500 Re: Java vs C++ Arne Vajhøj <arne@vajhoej.dk> - 2011-02-07 22:09 -0500 Re: Java vs C++ Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-08 15:57 +1300
csiph-web