File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Response from SUN on JLS 8.3.2.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Response from SUN on JLS 8.3.2.3" Watch "Response from SUN on JLS 8.3.2.3" New topic
Author

Response from SUN on JLS 8.3.2.3

Brian Lugo
Ranch Hand

Joined: Nov 10, 2000
Posts: 165
I am posting the response I received from SUN regarding my inquiry for clarification of the code listed in JLS 8.3.2.3, my email is indicated by ">" followed by their response:
>Howdy!
Hello
>Would it be possible for me get clarification on the language used in the Java
>program comments in the code mentioned in Section 8.3.2.3 of Java Language
>Specification Edition 2.
>I am specifically talking about the comments appearing in the "class
>UseBeforeDeclaration" class.
>It appears to me some of the comments are ambigious. You may want to compile
>the code and check it for yourself.
This is the spec; the compiler doesn't define it, it defines the compiler.
In particular, compilers may be buggy and not conform to the spec. I
believe this is the case wrt to this example. We need to revisit it, and
decide whether to enforce the spec and fix our compiler (and mandate others
to fix theirs) or whether existing implementations agree enough to define a
de-facto spec on this issue, and revise the spec accordingly.
>Also, I could not find the "errata" section
>for Java Language Specification book at the Java Developer Connection web
>site.
>Would you be able to point me to "errata" for the above mentioned book on the
>internet?
I need to put out an errata page. The location exists - it just hasn't any
information in it:
http://java.sun.com/docs/books/jls/clarifications-2-2nd-ed.html
>Looking foward to hearing from you,
>Brian
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Yep, that's the way it is. The spec is not made after the compiler but The compiler is built on the spec and if it (the compiler) doesn't fully comply with the spec then Sun decides whether the compiler is good enough that way or not (read changing a compiler and making other vendors change theirs costs a lot of money )
I guess we have to cope with that. The JLS states how every Java compiler should behave. If your compiler doesn't behave as expected, then there is probably a bug.
[ February 12, 2002: Message edited by: Valentin Crettaz ]

SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Brian Lugo
Ranch Hand

Joined: Nov 10, 2000
Posts: 165
Hi Valentin!
I agree, but the specs themselves have bug to begin with. That is not good at all.
The code mentioned in the Section 8.3.2.3 does not even conform to specs.
Anyways, this means that you cannot trust every word/sentence mentioned in JLS. You have to verfiy that by writing the code and executing it on a given compiler.
Brian
PS - Check out the comments by Junilu in this thread:
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=014681

[ February 12, 2002: Message edited by: Brian Lugo ]
[ February 12, 2002: Message edited by: Brian Lugo ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Response from SUN on JLS 8.3.2.3