Yes, but I don't like expression with else inside case. It's not so much informative.
else
case
Readable and efficient (only hit .size once):
case names.size when 0 when 1 when 2 else end
Loading collection data...
Yes, but I don't like expression with
else
insidecase
. It's not so much informative.Readable and efficient (only hit .size once):