I understand the getter/setter logic, I don't get it when it comes to value. Prototype could be used to pre-define shapes too where all properties are described upfront but those with just a value cannot be reused which is a limit if we think about securing prototypes.
Too bad I have missed that discussion br On Tue, Nov 6, 2012 at 4:03 PM, Axel Rauschmayer <[email protected]> wrote: > This has been discussed a while back: it is similar to how a getter-only > accessor works. > > > [[[Sent from a mobile device. Please forgive brevity and typos.]]] > > Dr. Axel Rauschmayer > [email protected] > Home: http://rauschma.de > Blog: http://2ality.com > > On 07.11.2012, at 00:31, Andrea Giammarchi <[email protected]> > wrote: > > so this mean that freezing a Contructor.prototype to enforce/ensure nobody > can change runtime that prototype will result in unusable code as we know, > right? Or we should never pre define properties that should be changed > runtime? Second one works and stink at the same time. > > I preferred the old V8 behavior ... if I freeze a __proto__ the object > should not pass through that proto when a property is set unless the proto > has a setter ... but this is another story I guess. > > Anyway, thanks for explaining this which is gold for a blog post. > > br > > > On Tue, Nov 6, 2012 at 1:46 PM, Brandon Benvie > <[email protected]>wrote: > >> Clarification: if an object has no own property, then it defers to the >> writability from the prototype chain. If it has an own property then it >> never checks the prototype chain. > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

