Fair warning... this is a question involving opinions about whitespace. How should I start writing an type-parameterized extension method in Scala 3?
-
-
Replying to @propensive
The official style in the docs is (1) extension [T](value: X) but I would also be OK with (4). Certainly not (3), that makes it look like a method call.
3 replies 2 retweets 29 likes -
Replying to @odersky @propensive
TIL I’ve not been following the style guide on this ever since I started coding Scala 5 years ago.
1 reply 0 retweets 0 likes -
"extension" is not an arbitrary method name, it's a new keyword in Scala 3. You can't possibly have not followed the style guide 5 years ago because this feature didn't exist back then.
1 reply 0 retweets 4 likes
Nor did the style guide...
12:09 PM - 9 Apr 2021
from Frankfurt on the Main, Germany
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.