Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Almost every javascript library you use is a singleton, so your second sentence makes no sense. Check the example, it is just the module pattern. If a programmer wants to deviate away from a pattern, the language lock-in won't stop them.

Also, the command pattern is a great tool for handling undo/redo on a UI. I think you are being way to dismissive of some good advice. Just because someone is trying to share a better way of doing things that is based on ideas created in another language does not detract from their value.



Can you give an example of a JavaScript library that is a singleton?




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

Search: