Zig's multi-sequence for loops
While this solves one of the issues I&#x27;ve had with Zig, it doesn&#x27;t seem very flexible. I would love to the same thing for (tuples of) variable-length arrays, arrays of different lengths etc. Now my implementation will still look completely different in slightly different situations.<p>Yes, a flexible solution (a zip function) would probably need iterators but why would introducing them be such a big problem? (FWIW, I know that one can emulate looping over iterators with while() and optionals[0] but it feels a bit dirty.)<p>More generally, my biggest gripe with Zig has been a lack of expressiveness: Things like deep equality checks between structs, arrays and optionals; looping over different kinds of containers; … should just work™. Sure, I understand that Zig doesn&#x27;t want hidden control flow but OTOH explicit control flow everywhere often just gets in the way of readability and of implementing business logic. I usually follow the approach &quot;Implement first, optimize later&quot; but with Zig the implementation will look completely different depending on which optimization or data structure I choose, so I need to think about optimizations from the start if I don&#x27;t want to rewrite everything later. I should mention, though, I&#x27;m very used to Python these days and haven&#x27;t written C or C++ in ages, so maybe that sort of culture shock is somewhat expected.<p>Anyway, I&#x27;m still excited about the language and my impression is that Andrew Kelley is very open to new suggestions and new ideas, so things will certainly still change in one way or another till v1.0.<p>[0]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34958051" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34958051</a>