ursus
02/10/2025, 8:55 PMif (foo &&
bar &&
quax
) {
...
}
vs
if (foo
&& bar
&& quax
) {
...
}Michael Krussel
02/10/2025, 9:56 PMfun main() {
val x = 5
-1
println(5)
}
The -1 will not be applied to x. There's shouldn't be any problem with the if statements because of the ().ursus
02/10/2025, 9:57 PMMichael Krussel
02/10/2025, 9:57 PMursus
02/10/2025, 10:33 PMVampire
02/11/2025, 7:55 AMHuib Donkers
02/11/2025, 1:01 PMVampire
02/11/2025, 1:24 PMursus
02/11/2025, 1:31 PMval x = foo.
bar.
quaxursus
02/11/2025, 1:32 PMVampire
02/11/2025, 1:34 PM. or ?. usually does not cause a parsing ambiguity and for those the official coding conventions indeed say they should be on the start of the next line.Wout Werkman
02/11/2025, 5:18 PMursus
02/11/2025, 7:29 PMVampire
02/11/2025, 8:41 PMursus
02/11/2025, 9:35 PM+ have an issue while || && dont, boolean operators work fine in start or endVampire
02/11/2025, 9:36 PM+ 1 is a valid statement, || true notursus
02/11/2025, 9:37 PMVampire
02/11/2025, 9:37 PMursus
02/11/2025, 9:38 PMVampire
02/11/2025, 9:38 PM- 1 🤷♂️ursus
02/11/2025, 9:39 PMVampire
02/11/2025, 9:48 PMVampire
02/11/2025, 10:07 PMursus
02/11/2025, 10:09 PMVampire
02/11/2025, 10:10 PMVampire
02/11/2025, 10:10 PMursus
02/11/2025, 10:12 PMVampire
02/11/2025, 10:14 PMVampire
02/11/2025, 10:17 PMephemient
02/12/2025, 3:26 AMVampire
02/12/2025, 7:41 AM