As explained earlier, the goal of this book is to show the richness and power of the Java language.
(no source provided for not to pick on anybody in particular) I meet the "rich" and "powerful" epithets all the time, they being applied to various... languages, frameworks and engines, but I am never quite sure what exactly they mean. Java is "rich" -- that the language has many operators (as opposed to, say, Lisp)? That it has a lot of class libraries? And regarding "powerful", aren't all Turing-complete languages equally powerful? Or something else is meant, like specialization. In Java case it doesn't make a lot of sense (or maybe it's the same class libraries), but it could for some framework or engine... Frankly, I am getting irritated every time I see either epithet, and earnestly, I suspect they don't really mean much besides "let's say something nice about our beloved language (framework, engine...) X". For them to be meaningful, there should be some scale we can compare things in. Does it exist? What kind of scale is it? ordinal, interval..? [ January 12, 2004: Message edited by: Mapraputa Is ]
Even buzzwords have meaning. I've always equated "Richness" with Perl's TMTOWTDI -- There's More Than One Way To Do It. By this scale, the Java language itself isn't terribly rich; C++, Perl, and Ruby are all much richer. Java is a simple language in which there's often only one sensible way to express an idea. C++ supports many different programming paradigms directly, and so is clearly richer. Considering APIs, though, it's a little better for Java, as there are multiple levels on which you can do various tasks (think of how many different ways you might implement a network service.) "Powerful" implies, to me, the ability to get the job done with relative economy. As Java can do a lot of different things, it's somewhat powerful; as C/C++ can do many more, you might expect them to be more powerful. Considering only the language, I think that again that's probably true. There are altogether too many things for which native methods are required; by definition, you're augmenting Java with the power of C++. But considering the standard libraries, again, I think Java is more powerful, as there are standard libs for graphics, networking, threading... many things that C++ libraries omit entirely.