Re: The greeting code in Java
On 06/19/2011 04:53 PM, Stefan Ram wrote:
The new C++ standard has more than 1300 pages, but this is
base on the C standard with more than 500 pages. These are
nearly 1900 pages of a text in a condensed technical
language, yet the language does not allow to access a
directory of the filesystem or a socket of the network.
In all fairness, the first 200 pages or so of the C standard are
language semantics, which C++ redefines for itself anyways. It's the
library and a few of the annexes that are important for C++ (so about
300 pages, give or take). Of course, you might want to add for some more
information specs like IEEE 754 (~70 pages) if you want to know more
information about floating points.
The JLS itself is 684 pages, compared to the ~450 pages that C++ takes
to explain its language. The C++0x library takes around 800 pages to
explain the rough equivalent to large hunks of java.lang and java.util.
On the other hand, the JLS is a lot more explicit and burns through
space with examples, so it is relatively low in information density for
a specification. The standard Java API is also probably the best example
of API documentation in widespread usage.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth