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

I'm really torn on my feelings about this article, it's mostly great, but the example of anonymous functions grates with me. I think it's a flawed example as it takes readable code and turns it into an unmaintainable mess, when the natural solution would be to use an object in the first place.


I agree. Just use proper objects and start internal member names with an underscore. Yeah, you cannot trust idiots not to misuse the internals, but they'll do worse with returning objects that close over function-local variables.




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

Search: