Re: My new toy
Arved Sandstrom wrote:
Why would an "average" programmer even need the JLS? The APIs and a
handful of decent books will serve them much better.
Another thought occurs to me. Before I state it, let me point out that I am
in favor of API docs and decent books (Bloch's /Effective Java/, Goetz et
al.'s /Java Concurrency in Practice/), and of online resources like
javapassion.com, mindprod.com, java.sun.com,
<http://www.ibm.com/developerworks/java> and the rest. For learning Java and
gaining true insight and mastery, they are /nonpareil/. I recommend using the
JLS as an arbiter and research tool, not a tutorial. That provides a direct
answer to Arved's excellent question. (Calling it "silly" is a rhetorical
device only, not a real judgment.) I started getting in the habit of using
the JLS to answer tricky detailed questions about Java behavior, particularly
generics and the multi-threading memory model. As an adjunct to the
aforementioned excellent sources, the JLS was invaluable.
The other thought is that the JLS is important for more than individual
programmers, or the obvious purpose of ensuring specific promises in Java
implementations. (Not totally successfully - Sun themselves violated the spec
prior to Java 5 by letting references to the 'class' literal initialize the
class.) As a social document, it's important as a bar for programmers. A
"fool bar", if you will, pun intended. In one's quest for perfection as a
developer, one should not shirk knowing the real rules, not just the second-
and third-hand re-interpretations. To become competent at if not comfortable
with reading the Java Language Specification is to achieve real competence
with the language, and an inability to read the defining document will always
be a serious handicap to any serious programmer.
As a body, the guild of Java programmers benefits by requiring competence in
the JLS in order to assert competence in the Java language. How can you trust
someone to work in the language who isn't even able to comprehend its
definition, or even to approach reading the definition from time to time?