Rick Waldron waldron.rick at gmail.com
Fri Sep 16 10:14:00 PDT 2011

On Thu, Sep 15, 2011 at 10:56 AM, Kyle Simpson <getify at gmail.com> wrote:

>  If I was a programmer
>> looking for something like weak referencing in JS for the first time,
>> "weak" is what I'd be searching for.
> But if you're actually aware of weakrefs (as I am), and you're searching
> for them in JS (as I was), and you see "WeakMap" (as I did), and you make
> the conclusion that "Weak" in the name means in fact weak references (as I
> did), then you probably also (as I did) assume that *all* the refs are weak.
> That's a failed conclusion, because only the keyrefs are weak.

I can second this _exact_ experience.

> The name doesn't do anything to enlighten you that it only offers weak
> keyrefs and not weak valuerefs -- in fact, by your "discovery" line of
> reasoning, the name is almost a landmine that traps/misleads someone who
> does in fact know about weakrefs -- someone who didn't know about weakrefs
> wouldn't necessarily make the same deductive assumption by seeing "weak" in
> the name.
> Misleading/confusing with an API name is, IMHO, worse than less
> implementation-self-**descriptive naming.
> --Kyle
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110916/39c74864/attachment.html>

More information about the es-discuss mailing list