that's a feature ... and if you do that either you know what you are doing
or you need to know what you are doing.
Shared objects are powerful, not a problem .. not the problem here, imho


On Wed, Nov 7, 2012 at 9:27 AM, Kevin Smith <khs4...@gmail.com> wrote:

>
>> Any other reasons for why they are discouraged?
>>
>
> This footgun:
>
>     function MyClass() {
>
>       this.value = 1;  // OK
>       this.list.push(0);  // Modifying the list for every instance -
> probably not intended.
>     }
>
>     MyClass.prototype.value = 0;
>     MyClass.prototype.list = [];
>
> - Kevin
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to