Lambda vs. function

David-Sarah Hopwood david.hopwood at
Sun Oct 26 12:53:46 PDT 2008

Maciej Stachowiak wrote:
> On Oct 20, 2008, at 2:23 PM, Dave Herman wrote:
>> I doubt there's any clean way to fit tail positions into a switch
>> statement, since it works by jumping out of the statement. I'll have  
>> to look closer at the semantics of the completion value of a switch
>> statement; there might be some reasonably straightforward notion of a
>> tail position. But I doubt it.
> I don't think you can represent tail position in a switch statement  
> with your "attribute grammar" notion, but it's clear to me that the  
> statement immediately before a break statement, or else the last  
> statement in the last case or default clause, is in tail position.

You mean that these are in tail position iff the switch statement is.

(This *is* possible to express directly with an attribute grammar,
but it is a bit tedious, so I will only work out the details if asked.)

David-Sarah Hopwood

More information about the Es-discuss mailing list