An introduction to the JavaScript Module Pattern
javascriptplayground.com
javascriptplayground.com
Jeremy Ashkenas (who knows a lot more about this than I do) explains this in another comment thread here: http://news.ycombinator.com/item?id=2991904
And if you want to go further, a convention that anything starting with an underscore is private, and probably shouldn't be accessed or called without good reason and the understanding that it may break or change at any time is a good idea. (This is how Python works.)
In the real world, enforcing information hiding isn't really useful.
I've been burnt in the past with using someone else's javascript code and finding out that something I needed to modify they hadn't deemed public for some weird reason.
Forking the code isn't the best pattern for code reuse.
object.defineProperty
allows specification of getter, setter, and writable flag (among others).
"Unsupported features" at https://github.com/jashkenas/coffee-script/wiki/FAQ
https://github.com/jashkenas/coffee-script/issues/451
If calling code uses it knowingly, then they should know it's bound to break in future. The overhead (cognitive, and possibly execution) of not exposing the property isn't worth it, I think.