The Source for Java Technology Collaboration
User: Password:



Tom White

Tom White's Blog

The Java Language Specification, 3rd Edition

Posted by tomwhite on February 28, 2005 at 02:16 PM | Comments (6)

There was no fanfare, in fact it's not even linked to from the JDK 1.5 documentation, but the third edition of the Java Language Specification is available for "maintenance review". I only found it because I wondered if a new version of the JLS had been produced for 1.5, and went out looking for it. The changes are only "proposed" changes - it is odd that they didn't go final with the release of 1.5.0 - and there's even a language change from 1.4 in there too (assertions). Presumably it will be finalised when the book is printed.

There have been some big changes in Java recently so it's good that the JLS has had a bit of work done on it as it was looking a bit forgotten. Here's a list of the new language features by chapter:

  • Chapter 3, Lexical Structure - Unicode supplementary character support
  • Chapter 4, Types, Values and Variables - Generics
  • Chapter 5, Conversions and Promotions - Autoboxing/Unboxing
  • Chapter 7, Packages - Static Import
  • Chapter 8, Classes - Varargs and Typesafe Enums
  • Chapter 9, Interfaces - Annotations
  • Chapter 14, Blocks and Statements - Enhanced for Loop and Assertions
  • Chapter 17, Threads and Locks - The Revised Memory Model (almost completely re-written)

It's probably worth a re-read.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I attempted to use the JLSv3 Chapter 18 grammar to implement a simple Java 5.0 parser a couple of months back, but I was disappointed that the exposition style grammar of the main text has been mixed in with the implementable grammar of Ch18 (particularly around the new features such as enums and generics of course). I have lodged a comment with them in this regard, as it would be great if the Ch18 grammar was usable again.

    http://cvs.codehaus.org/viewrep/groovy/groovy/jsr/ideas/parsers/bpwj/src/com/javanicus/bpwj/JavaParser.java?r=1.4

    Good to see you blogging at last Tom,
    we must do lunch soon :-)

    jez.

    Posted by: j6wbs on March 01, 2005 at 01:03 AM

  • I've always found the JLS a good complement to the standard JDK documentation set. I never refer to it that often, but when I have difficult syntactic bugs to fix it's invaluable.

    Ian.

    Posted by: ifairman on March 01, 2005 at 01:08 AM

  • I've heard the same complaint before - that the grammar seems to be for expository purposes rather than being useful for a real implementation. This is a pity, and makes it hard to take the JLS seriously. Let's hope it gets fixed. Tom

    Posted by: tomwhite on March 01, 2005 at 01:21 AM

  • that the grammar seems to be for expository purposes rather than being useful for a real implementation.
    The JLS isn't meant as a language tutorial or an API reference. It's purely there as a guide to define and describe the language formally.
    You can use it to get the definitive answer on problems in your code that you don't understand, but mainly it's there for compiler writers and people prepping for the SCJP.

    Posted by: jwenting on March 01, 2005 at 04:46 AM


  • Just FYI, these are the maintenance review materials for the JLS maintenance review completed last September, as part of finalizing the java language changes in Tiger

    See http://jcp.org/en/jsr/detail?id=901

    - Graham

    Posted by: kgh on March 01, 2005 at 10:29 AM

  • Thanks for the link, Tom.

    Shouldn't the language spec and the VM spec modifications have been finalized before JDK 1.5 cemented the changes as a status-quo, though? I'm a bit confused how JSR's can be finalized without their sub-JSRs being finalized.

    cheers,
    dalibor topic

    Posted by: robilad on March 02, 2005 at 07:47 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds