Hacker News new | ask | show | jobs
by nicoburns 1298 days ago
Frankly I think classic c-style for loops are a terrible abstraction for beginners. Iterator based loops make sense on a high level ("I don't care how it works, I only care what it does"). And while loops make sense on a low level ("I can see how each piece works"). To a beginner, c-style for loops are just an obscure, implicit syntax for while loops.

> Even strings blur the line between individual characters and actual strings

IMO that's better than what C++ does, where it pretends that a character is a single byte. Whereas most code nowadays is using unicode, which means that code will break as soon as they try to store a non-ascii character in it.