Mark S. Miller (2013-07-31T14:38:58.000Z)
On Wed, Jul 31, 2013 at 5:47 AM, Erik Arvidsson <arv at google.com> wrote:

>
> On Jul 31, 2013 1:39 AM, "Mark S. Miller" <erights at google.com> wrote:
> >
> >
> >
> >
> > On Tue, Jul 30, 2013 at 9:19 PM, Brendan Eich <brendan at mozilla.com>
> wrote:
> >>
> >> Mark Miller wrote:
> >>
> >>> On Tue, Jul 30, 2013 at 8:36 PM, Brendan Eich <brendan at mozilla.com<mailto:
> brendan at mozilla.com>> wrote:
> >>>
> >>>     Mark S. Miller wrote:
> >>>
> >>>         Aside from this confinement issue, all other the advantages
> >>>         that unique symbols have over unique-ish strings seem minor to
> >>>         me. The biggest is default non-enumerability, when we're
> >>>         getting away (admittedly slowly) from enumerability being
> >>>         significant anyway. IMO, if the only advantages of unique
> >>>         symbols over unique-ish strings are these minor ones, then
> >>>         they don't pull their weight.
> >>>
> >>>         However, I don't understand the confinement scenario you have
> >>>         in mind. Can you give an example?
> >>>
> >>>
> >>>     A friend field a la C++ "friend", e.g.:
> >>>
> >>>     module ... {
> >>>       const friend = Symbol(); // however it's spelled
> >>>       class A { ... }
> >>>       class B { ... }
> >>>     }
> >>>
> >>>     where fiend is used in the ... elisions but only to access
> >>>     properties of objects known to be instanceof A or B.
> >>>
> >>>
> >>> Known how?
> >>
> >>
> >> Lots of ways, e.g., |this| in bound methods,
> >
> >
> > Only useful for instance-private instance variables, in which case you
> may as well use lexically captured per-instance state.
>
> Also useful for methods where different subclasses needs to specialize the
> behavior.
>
> We've tripped on the method use case before. Let's not repeat that mistake.
>

Hi Erik, I'm missing your point. Could you give an example? Thanks.



> >> |this| after suitable instanceof tests with no mutable [[Prototype]]
> (e.g., A and B  are sealed, manually in ES6 alas, but still doable).
> >
> >
> > Doesn't resist theft by proxy, since one can easily construct a proxy
> that passes that instanceof test.
> >
> >
> >>
> >>
> >>
> >> /be
> >
> >
> >
> >
> > --
> >     Cheers,
> >     --MarkM
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130731/2403aa24/attachment-0001.html>
domenic at domenicdenicola.com (2013-08-02T20:43:00.347Z)
On Wed, Jul 31, 2013 at 5:47 AM, Erik Arvidsson <arv at google.com> wrote:

> Also useful for methods where different subclasses needs to specialize the
> behavior.
>
> We've tripped on the method use case before. Let's not repeat that mistake.

Hi Erik, I'm missing your point. Could you give an example? Thanks.