also, properties can be defined as getters and setters so that you might want to share them in the same scope/context the rest of the prototype is defined and not later on inside the constructor. Yes, there are work around for this but again, if that Object.freeze problem is solved, there is no reason to avoid properties in the prototype, imho
On Wed, Nov 7, 2012 at 10:02 AM, Andrea Giammarchi < [email protected]> wrote: > same would be for data methods > > > On Wed, Nov 7, 2012 at 9:52 AM, John J Barton <[email protected] > > wrote: > >> >> >> >> On Wed, Nov 7, 2012 at 9:17 AM, Axel Rauschmayer <[email protected]>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 >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

