Comment

Comment by slazaro

I would consider his version "not ideal code" in the sense that 99% of people reading it would go "huhh?" and be confused, they'd think that it has a typo because it isn't using the for-structure in the classic way, etc.

Code is not only for machines to read, it's for humans to read, and this one works but it doesn't communicate effectively to humans. It's great if you work alone, or if you work with a team that uses this type of loop and is used to it. But otherwise, I don't think it's ideal at all.

parent slazaro 10 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton