Hacker News new | ask | show | jobs
by TeMPOraL 3450 days ago
Personally I have a habit of avoiding that, especially in dynamic languages, because a single typo could have nasty consequences there. So I always figure out a synonym, or use a name for the variable that's either more descriptive:

  for (let particularThing of things)
or at least visibly different:

  for (let th of thigns)
1 comments

The dynamic languages I primarily use are TypeScript and Dart. I always have enough type information floating around to catch this kind of thing. But even in JavaScript it wouldn't be much of an issue since it will instantly explode on the first run, which is certainly inconvenient, but nothing major.