For the record, I strongly dislike the function behaviour. Turning a
function expression into a declaration silently changes the meaning of
internal recursive references, in ways that many people find very
surprising. That is an unnecessary pitfall.

Your argument essentially is that you want to be able to do some AOP-style
hacking on (otherwise internal) class bindings. But as Allen pointed out,
that isn't reliable anyway, nor would it work for classes that do not
happen to be defined using class declaration syntax. So I think it is a
fairly weak argument. It is even preferable that the language does not
encourage such brittle patterns.

In summary, I'm glad that we did not adopt this behaviour for classes.

(On the other hand, I do think that it probably was a serious mistakes to
make class bindings mutable.)

/Andreas



On 4 March 2015 at 13:23, Jason Orendorff <[email protected]> wrote:

> I guess we are just going to disagree here. Double bindings with
> mutability still seem clearly bad. I can't make sense of the rationale
> that classes can cope with every external binding being mutable except
> for, somehow, their own name, and we're doing users a favor by
> "protecting" them from "tampering" for just this one binding in this
> one place.
>
> -j
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to