> Declaring access modifiers on the interface goes against the recomendation of 
> the JLS and should have zero effect on the code. Which compiler is not 
> producing such results?

There's no compiler fault involved, Pete.  In this case coders will receive a slightly 
baffling compile time error message with regard to changing access privileges in an 
implementing class, which slows down the work of creating a Mailet.

My feeling is that the style guideline in 9.4 is misleading and tends to create bugs.  
The reason it is misleading is that the implicit access privilege for a method in a 
class is different from the implicit access privilege for a method in an interface. In 
practice, interface declarations are templates for implementing classes.  As they 
should be!  Copy, paste, and fill-in is the best way for programmers to avoid 
transcription errors.  

Concurring opinions:
http://groups.google.com/groups?hl=en&selm=35D039B2.E8D18A1F%40eng.delcoelect.com
"I strongly disagree with the style guideline in the second sentence
because I believe it can lead to misunderstandings"

http://www-124.ibm.com/pipermail/jikes/1999-October/001285.html
*** Warning: The lack of the "public" modifier in this context is
misleading and strongly discouraged as a matter of style. This method has
been exposed as public per section 2.13.5 of the VMSpec.

Gil Bracha, one of the Sun spec developers, in email:
I'm inclined to agree, and remove the style guideline in future editions.  I 
don't particularly agree with the idea of pasting in interfaces as 
templates; in my mind this reflects the ludicrously primitive state of 
development tools. However, I don't see the need for the JLS to overspecify 
things, or mandate a particular style in this case.


best,
Lucas


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to