You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 🙀 *
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. 🙀 *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)
The text was updated successfully, but these errors were encountered: