3
kiki
21h

standard for loop syntax is super ugly.

Comments
  • 4
    … if you use clown or archaic languages
  • 1
    Every language needs to support "for else" statements.
  • 1
    Everybody shits on for loops until you need an increment other than 1.

    I do like the new collections for loop in C++. Ranges are even better.
  • 2
    When writing a languance, it's quite an annoying one to implement. But in one interpreter it went flawless, that was the moment i thought "now is my design ok".
  • 2
    As shit as PHP can be, the foreach one is quite nice (a few other languages have similar too)
  • 0
  • 1
    @MammaNeedHummus some languages even only have the foreach loop and not the classic for loop (it’s called just 'for' there).

    Because for the extremely rare case that you really need the classic for, you can easily use foreach with int-ranges.
Add Comment