Yield as contextual keyword

Brian Goetz brian.goetz at oracle.com
Mon May 27 15:24:36 UTC 2019

This is really two questions.  We could have a non-ambiguous keyword (eg break-from-expression-switch); that’s separate from the keyword vs operator story.  

To the latter, I think the simple answer is: all existing control flow operations (return, throw, break, etc) are words.  This does not seem sufficiently different to change paradigms by creating an operator.  

To the former, this is a trade off between spec complexity and reading clarity.  To this, the question of whether this is a good trade off is a reasonable one.  If the complexity can be reasonably bounded, I think most people prefer a new verb to the set of things that can be constructed with real unambiguous keywords, but this is surely subjective. 

Sent from my MacBook Wheel

> On May 27, 2019, at 4:06 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> I don't enjoy being the token curmudgeon here, but I find it
> increasingly hard to appreciate why a non-ambiguous choice (prefix "^")
> with precedence in related languages should be rejected in favor of one
> requiring context-sensitive grammar mangling with some known odd
> consequences. At the very least, could someone help check as-yet-unknown
> impact by using candidate parsers on large source corpuses (for example
> http://groups.inf.ed.ac.uk/cup/javaGithub/, google-internal, etc)?
> -Doug

More information about the amber-spec-experts mailing list