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

> Adding syntax sugar muddles this, and introducing another keyword

There is no new syntactic sugar nor there is a new keyword here though. It just changes how range works.

That being said, I'm not a fan of range having two modes of functionality. Perhaps it could just use an interface, now that we have generics it can be implemented on the existing supported types. And compiler can do whatever with it if it would be too slow.



This is a textbook example of syntactic sugar, where a feature can be trivially transformed into simpler code that doesn't make use of the feature




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

Search: