Re:JavaScript Things I Wish I Knew Much Earlier In My Career
by mootothemax on Tuesday April 20, 2010 @11:48AM
(#1279711)
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.
[ Parent
| on HN ]
Re:JavaScript Things I Wish I Knew Much Earlier In My Career
by Daniel_Newby on Tuesday April 20, 2010 @04:34PM
(#1280524)
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.