| ▲ | forgotpwd16 a day ago | |
Funnily, Zig does allow doing it explicitly like that, just need use while rather for:
That said, perhaps Odin, for which simplicity and readability is guiding principle in its design, is more up your alley. In Odin, can be read:
Exactly same style can be used in Go & V (which is/was? quite infamous here in HN). But in all languages, for this example at least, a foreach-like iteration, i.e.
would be preferred. | ||