News for hackers. Stuff that matters.
Re:An introduction to the JavaScript Module Pattern by grannyg00se on Friday April 13, 2012 @10:00PM (#3839606)
Or if ECMAscript 5 is an option checkout

object.defineProperty

allows specification of getter, setter, and writable flag (among others).

Re:An introduction to the JavaScript Module Pattern by ronaldj on Friday April 13, 2012 @11:55PM (#3839840)
The syntax is ugly. They should've made it a little less verbose.
Re:An introduction to the JavaScript Module Pattern by Cushman on Saturday April 14, 2012 @01:31AM (#3840019)
I'm sure CoffeeScript will adopt a much more elegant syntax for the feature :)
Re:An introduction to the JavaScript Module Pattern by epidemian on Saturday April 14, 2012 @05:51PM (#3842087)