4 ms·
That's the problem though, a C for loop doesn't really work like that. We only recently got something close with the "range-based for" in C++, and while python'
by Y_Y 6y ago
That's the problem though, a C for loop doesn't really work like that. We only recently got something close with the "range-based for" in C++, and while python's list comprehensions do pretty much exactly what I think mathematical "for" should, it re-uses the keyword in different ways elsewhere.
- btilly 6y agoHow recent an innovation this is depends on your language. It was added in C++11 so it looks recent there. But the syntax was in Perl 4 back in 1991. And someone who knows programming history can probably find older examples still in other languages.