louiscad
11/04/2019, 9:25 AMwhen (stuff)
to allow just calling methods, adding the receiver to the branch conditions, or have stuff.when
do that as a new special syntax. (Thinking about how it would translate to actual uses cases, I think I prefer that latter approach)Burkhard
11/04/2019, 9:56 AMwhen(stuff)
but that might just be me.Ruckus
11/04/2019, 2:44 PMlouiscad
11/04/2019, 2:51 PMHullaballoonatic
11/09/2019, 7:56 PMwhen (a) {
< b -> foo()
b -> bar()
> b -> baz()
}
instead of when (a.compareTo(b)) {
-1 -> foo()
0 -> bar()
else -> baz()
}
the former reads a lot more akin to the equivalent mathematical syntax