3 ms·
The iterator in my example will also happily iterate on things that don't exist. We all agree that it's possible to do in any language. But the main point is th
by porphyra 1y ago
The iterator in my example will also happily iterate on things that don't exist. We all agree that it's possible to do in any language. But the main point is that the blog post is talking about syntactic sugar for an easier way to do it.
And yes, Haskell is amazing at this sort of thing.
- jerf 1y agoThe syntactic sugar being asked for in this case is awfully thin. I definitely put this in the class of "stop pining for it and just use what's there". If the poster wants to particularize this to C++ because C++'s syntax can't support it in any reasonable manner, that's fine, but that's a C++ problem, not a "Programming languages..." problem. Which would be perfectly understandable and I'm not really complaining, more clarifying that most of the rest of the world can just rub together three or four existing constructs in a pretty reasonable manner to get this.