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

> Developers would often write helper functions that accidently mutated the original Date object in place when they intended to return a new one

It's weird that they picked example code that is extremely non-accidentally doing this.



An example that is hard to follow defeats the point. It's just showing what pattern is possible and you can imagine the abstraction layers and indirection that would make it happen accidentally.




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

Search: