Proposal: Abstract References

Mark S. Miller erights at google.com
Tue Oct 21 13:33:05 PDT 2014


Let's not invent a new mechanism when the existing WeakMaps already have
exactly the right core semantics, and (but for a temporary implementation
dead end) already admit of an efficient implementation.


On Tue, Oct 21, 2014 at 1:30 PM, Kevin Smith <zenparsing at gmail.com> wrote:

>
>> That said, this is really elegant and if nothing else it seems like good
>> underpinnings for some slightly-higher-level private state abstraction.
>
>
> Right - the idea is that sugar could be introduced over this for declaring
> private fields.  Also, this proposal doesn't depend upon WeakMaps for
> private fields, per se.  We could imagine some new, opaque thing that uses
> the same "referenceGet/Set/Delete" mechanism.
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141021/e0d2f2f0/attachment.html>


More information about the es-discuss mailing list