Guards redux
Guy Steele
guy.steele at oracle.com
Thu Mar 11 02:17:40 UTC 2021
> On Mar 10, 2021, at 5:19 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> On Mar 10, 2021, at 11:29 AM, Guy Steele <guy.steele at oracle.com> wrote:
>>
>> Let me suggest this alternative:
>>
>> Pattern:
>> : ConditionalOrPattern
>> : ConditionalAndPattern `&&` Guard
>
> Clever. Too bad we can’t do this for expressions too.
>
>>> Guard:
>>> : AssignmentExpression
>>
>> Yes, “AssignmentExpression” is the right thing here.
Duh.
> Please see my previous objection: I think the looseness
> of AssignmentExpression leads to even worse puzzlers
> than the ones you are addressing above.
>
Actually, we had essentially the same idea for improving the grammar, but each of us spotted just one of the two problems. (Are there more?) You put it best: we should avoid uselessly enabling more puzzlers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20210310/a1d2adb0/attachment-0001.htm>
More information about the amber-spec-experts
mailing list