Optional braces: Is that intended? #19963
Replies: 3 comments
-
| for tuples in particular,  as per https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling.html yet one might still wonder about types other than tuples. I don't see anything about it in the long design discussion at https://contributors.scala-lang.org/t/make-fewerbraces-available-outside-snapshot-releases/5024/196 my best guess would be that it's considered satisfactory to put  this way of writing it has the advantage that you can add more  | 
Beta Was this translation helpful? Give feedback.
-
| I don't particularly like this either, but yes it is a known restriction. | 
Beta Was this translation helpful? Give feedback.
-
| Whenever I get a chance to use one-line catch I want to use one-line case everywhere. 
 https://en.wikipedia.org/wiki/Case-hardening The dictionary says it can be taken metaphorically for "callous" or let's say "hard-boiled". The other vocab word from the wiki article is "bloomery". I was unfamiliar with the metallurgy. | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I find it weird I can write function arguments after
:but can't writecaseBeta Was this translation helpful? Give feedback.
All reactions