On Tue, 29 Oct 2024 16:00:43 GMT, Kevin Rushforth <[email protected]> wrote:
>> Sure:
>>
>>
>> String s = switch(val) {
>> case 1 ->
>> "one";
>> case 2 ->
>> "two";
>> default ->
>> "unknown";
>> };
>
> That isn't an example of "everything on one line". That's effectively the
> "switch case NNNN:, on a line by itself", which is defensible, although still
> not preferred.
>
> Anyway, what you currently have is what I called option 1, and it doesn't
> seem very readable. I'll still leave it up to you, but please consider the
> comments made in this thread.
I'm not sure why this is a counter argument. It's not used in the JDK or
JavaFX. I still think option 2 is better, but if we don't enforce a style then
it's your choice.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1604#discussion_r1821148198