Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor8383114dWhen 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".
-
MammaNeedHummus4414114dAs shit as PHP can be, the foreach one is quite nice (a few other languages have similar too)
-
MammaNeedHummus4414114d
-
Lensflare19276114d@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. -
Salmakis680114d@Lensflare i srsly experienced senior devs that where not able to understand for i loops.
-
Lensflare19276114d@Salmakis what are "for i" loops?
To clarify what I mean by classical for loops:
for(int i=0; i<10; i++)
What I mean by modern for-each style loops:
for(i in 0..10) -
Salmakis680114dI mean that classical, index based loops.
The second one would i never use when i got an index, but thats just because im old.
standard for loop syntax is super ugly.
random