Ducks, Rabbits, and Privacy

Kevin Smith khs4473 at
Tue Jan 22 13:03:17 PST 2013

> +1 to this and everything else Nathan has said. Watching all this intense
> back and forth, there are a lot of good points, some of which almost
> convince me that weak maps are sufficient and private symbols are
> unnecessary. But when I step back for even a minute, as a developer private
> symbols are exactly what I want, and weak maps are an un-ergonomic hack.

Are you sure they are what you want?  When you attempt to create private
methods using private symbols, you will break the inheritance mixin
pattern.  Is that what we want?

A weakmap-based solution can be made as ergonomic as you like.  Without
syntax, it can be a simple function call (like Juan Dopazo's), and with

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list