I believe there are use cases for the for .. in syntax right?
So I don't have anything against the for .. in syntax personally, but no, there are no special use cases for it. I mean, I'm sure if you tried you could construct a situation where for might be preferable to .each, but really, it's presence in the language at this point is just vestigial.
I'm not sure I've ever seen it used outside of a tutorial.
I was amused to see that Crystal-lang went so far as to remove it altogether.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So I don't have anything against the
for .. in
syntax personally, but no, there are no special use cases for it. I mean, I'm sure if you tried you could construct a situation wherefor
might be preferable to.each
, but really, it's presence in the language at this point is just vestigial.I'm not sure I've ever seen it used outside of a tutorial.
I was amused to see that Crystal-lang went so far as to remove it altogether.