Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Author here, nice! TIL :)


I have written Ruby professionally for like fifteen years and I have not once witnessed a `for` loop.

I’m genuinely confused as to where you picked this up. Enumerator and Enumerable are endemic.


I would actually say that if I found a for loop in Ruby, it will be a code smell.


~15 years here too, and I can't remember my last for loop either.

I think for loops are mostly used in Ruby by people that picked it up in other languages first and simply never unlearned it.


Almost twenty years here. I have definitely seen and used `for` loops, but they are the _exception_ and usually used in one-off scripts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: