Re: [Java Spec Report] Re: JSR 201 enhanced-for comments

Eric Blake <[email protected]> Thu, 11 Mar 2004 07:38:44 -0700
Newsgroups gmane.comp.java.spec-report
Message-ID <[email protected]>
Jikes CVS (post-1.19) has a first cut at a foreach implementation, now.  It 
currently does not emit variable name(s) into the local variable table for the 
synthetic variables, because no one has requested that feature yet.  I argue 
that jikes should not emit variable names unless there is a naming convention 
used for such variables (because otherwise the user's and compiler's 
expectations have no bearing on one another).  I haven't tested javac to see 
if it spits out a synthetic variable name (I wanted jikes' implementation to 
be clean-room).

By the way, my earlier posts about grammar difficulties, where I posted a new 
expansion of FormalParameter, can be resolved in a different manner.  By 
expanding ArrayType differently, LocalVariableDeclaration and FormalParameter 
no longer need an inline expansion (the jikes grammar is available on CVS; but 
I will post another message here when I have a complete LALR(1) grammar for 
ALL 1.5 features integrated together).  The only thing that jikes lacks in its 
foreach implementation is using foreach on generic types, since it does not 
yet fully support generic types.

Pat LaVarre wrote:

>>... a compiler give names to the synthetic
>>variables and include them in the table?
> 
> 
> Yes please.
> 
> 
>>... argue that a developer debugging the code
>>might like to know the value of the synthetic
>>variables inside the loop ... should probably
>>provide rules for the naming convention used
>>on these synthetics.
> 
> 
> Precisely.
> 
> Pat LaVarre
> 

-- 
Someday, I might put a cute statement here.

Eric Blake             [email protected]



To unsubscribe from this mailing list, send an email to:
[email protected]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/java-spec-report/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/