getter & setter for private objects
David-Sarah Hopwood
david-sarah at jacaranda.org
Mon Nov 2 23:18:52 PST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
memolus at googlemail.com wrote:
> 2009/11/2 Brendan Eich <brendan at mozilla.com>:
>
>> Defining accessors on an activation object is nasty,
>> If you want private getters and setters, you can put them in an object denoted by a private var:
>
> So you prefer ugly solutions, because the others are nasty?
Yes. Here "ugly" just means "verbose and inelegant", whereas "nasty"
means "having poorly understood and subtly error-prone consequences".
So ugly beats nasty every time :-)
- --
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iF4EAREIAAYFAkrv2VwACgkQWUc8YzyzqAe32wEAhpO3jMN9ocd1byz6tdPEBBCH
U9y2ehpsThazZPN+aA4A/2MKGgL1ESuwU7PeOq4HY2jxh18M0GzjWPhWFQA8Tm4/
=wSUQ
-----END PGP SIGNATURE-----
More information about the es-discuss
mailing list