i'v been using javascript getters for a long time in my applications, and always thought
that they work like this:
myobject.prototype.__defineGetter__('something', function () {
return DoSomeHeavyComputation() // this will be executed only once and will be saved
})
new myobject()
myobject.something // the computation will be done here
myobject.something // no computation will be done here.
i just found out the computation is done each time...
is there a resource or something that shows how do they actually work ?