Finding the right keyword for new features (was "Re: Could we change the syntax for when clauses?")

David Alayachew davidalayachew at gmail.com
Wed Dec 7 18:55:22 UTC 2022


I have one more question I'd like to ask. Aside from this, I think we've
explored the idea well enough, so I'll leave the topic alone for good.

Are we opposed to doing something like this?

    case Integer i #when i > 0

My goal here is to use the # symbol (or any other unused symbol) as sort of
a springboard into a larger pool of potential signifiers. You get
simplicity and expressiveness for the cost of one more character that is
currently unused (to my knowledge). Furthermore, the introduction of the
unused character can help with visually separating the pattern from the
guard, but with minimal loudness. And of course, being unused means that it
meets the needs for Java language parsing folks too.

Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20221207/9ff7cdab/attachment-0001.htm>


More information about the amber-dev mailing list