Why are non-method properties in a prototype an anti-pattern?

Andrea Giammarchi 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.
>
> jjb
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121107/f77bb268/attachment.html>


More information about the es-discuss mailing list