break seen as a C archaism
Kevin Bourrillion
kevinb at google.com
Wed Mar 14 18:04:27 UTC 2018
On Wed, Mar 14, 2018 at 8:14 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
In the meantime, let me probe for what's really uncomfortable about the
> current design point. Is it:
> - That there are two ways to yield a value, -> e and "break e", and users
> won't be able to keep them straight;
>
Nope.
> - The idea of using a statement at all to yield a value from an
> expression seems too roundabout;
>
Not really.
- That we are overloading an existing control construct, "break", to mean
> something just different enough to be uncomfortable;
>
To some degree yes, since `break <identifier>` already means something.
> - Something else?
>
Part of it is the ability to embed a number of statements inside an
expression (please, at least require curly braces, but still).
Part of it is that I know how to make sense of (a) current switch and (b) a
simple well-behaved nice expression switch that only uses `->`, but knowing
that I may have to deal with (c) code that is some mixture between the two
feels like additional level of complexity to me. Even if from an
implementation standpoint it's not.
--
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180314/206e1ed3/attachment.html>
More information about the amber-spec-experts
mailing list