Scala has no c-like for loops on the notion that we use for for other things and anything you can encode as a for loop you can encode as a while loop.
for loops in GLSL are a big thing however, especially in demoscene-like code-golfing, but also because support for while loops is not universal across graphics hardware. :scream_cat: *
Things like this are common:
for(int i = 0, j = count - 1; i < count; j = i, i++) {
...
}
A collision of langugaes!
Scala has no c-like for loops on the notion that we use
for
for other things and anything you can encode as afor
loop you can encode as awhile
loop.for
loops in GLSL are a big thing however, especially in demoscene-like code-golfing, but also because support forwhile
loops is not universal across graphics hardware. :scream_cat: *Things like this are common:
And that is tame compared to this:
It would be nice, as a nod towards the former case to be able to use tuples as the initial type.
I also note that above we have a- Checked, this works fine.Float
fori
and I'm not sure we support that either?(* Could be wrong / could be out of date advice)