So following up on this, and double-checking with
:javap, I wonder if there is a deeper reason why
for (x <- (range: Range)) ...
is not compiled to
while loops yet by scalac (tested in 2.12)? Wouldn’t that be a rather trivial optimisation, and one that would apply in many many cases?