Wouldn’t rand # & mod combo compile faster than nextBoolean?
6
Anonymous16w
Crash out
5
Anonymous15w
Something I like doing is splitting the ternary operator over multiple lines. Best of both worlds. Like this:
return random.nextBoolean()
? a
: b;
5
Anonymous16w
was there any justification?
3
Anonymous15w
Didn’t even omit the else block 💔💔
3
Anonymous16w
His is more quickly understandable
1
Anonymous15w
The first line isn’t even that hard to understand and is a lot cleaner. Your teammate is crazy
1
Anonymous#216w
He didn’t see it he said
9
Anonymous#615w
The one liner is way quicker to read. I don’t think we should stop using ternary operators just because some people are too lazy to understand what they mean even though it’s ridiculously simple