Why are non-method properties in a prototype an anti-pattern?
andrea.giammarchi at gmail.com
Wed Nov 7 10:02:55 PST 2012
same would be for data methods
On Wed, Nov 7, 2012 at 9:52 AM, John J Barton
<johnjbarton at johnjbarton.com>wrote:
> On Wed, Nov 7, 2012 at 9:17 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
>> In theory, one can use prototype properties to provide default values for
>> instance properties.
> In practice instances are free to write on these values in addition to
> using them as defaults. Then suddenly the 'default' is changed for other
> instances. It is then you realize that the theory is not a very good one.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss