Hacker News new | past | comments | ask | show | jobs | submit login

I think developers should always try to avoid poor programming practices instead of relying on implementation details of the browser.



Poor programming practices? The code that creates circular references is clearer than the example workarounds. Sacrificing clarity to avoid a problem that doesn't occur in supported browsers doesn't make much sense.


Failing to call "delete" on a pointer you "new"'ed in C++ is also clearer, and just as incorrect. The ECMAScript spec makes no mention of how memory will be managed for the user. Right or wrong in terms of clarity, it's still a poor practice to assume the browser will behave in a particular way that's not covered by the specification (regardless of how sensible that behavior might be!).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: