Axel Rauschmayer wrote:
Beware scenario-solving in an all-or-nothing way. There's no absolute good
here, and while people may (due to Prototype's Object.extend) want = not : in
most cases, that doesn't mean : is unnecessary.
Define properties manually when you really need it? I agree with Zakas et al.:
it will be nearly impossible to teach. I have a hard time telling the two
apart, too.
Another alternative: give up on mustache since it bends object literal syntax
past its breaking point.
I see two options:
1. Only do =. How will method definitions be done?
That's the least of it!
You said "impossible to teach", yet under your (1) here, you'd be
teaching new, bespoke syntax that looks a bit like object literals but
has differences both syntactic (= not :) and semantic (assign not define).
If you can teach a new song to a musically inclined child, why not teach
them the song Allen proposed?
If you can't teach what Allen proposed but you can teach only = not :
then teach the subset and leave : for the more advanced students.
2. Only do :, but with [[Put]].
This is a non-starter in TC39.
Even ignoring the inconsistency with object literals, (2) may well
result in exploits down the road. History does not repeat but it rhymes.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss