A huge +1 and hugs and kisses for your entire post. And I didn't say anything 
like Mikeal's paraphrase, and the ES6 harmony:proposals bear this out (<| is 
unsexy in my current font!).

It's especially important not to discount shorthands and sugar for cliché, even 
though they could be replaced by equivalent long-hand. English does not only 
have "is not". It has "isn't" as well, and we're better off for that kind of 
contraction. Yes, this makes it harder to teach -- I know, I have a 7 and a 6 
year old learning the rules right now, along with the raft of irregular verbs 
in English that such children need to know -- but learners manage.

/be

On Oct 4, 2011, at 12:59 PM, Bob Nystrom wrote:

> 
> 
> On Tue, Oct 4, 2011 at 10:52 AM, Mikeal Rogers <[email protected]> 
> wrote:
> 
> My main concern with *some* of the proposals is that I feel they add features 
> and clever syntax for experts at the expense of keeping the language easy to 
> understand for new programmers.
> 
> It's hard to satisfy both sets of users here. It's important to try and do 
> our best, but many things are trade-offs. I don't think we can declare "thou 
> shalt not change the language in a way that makes it harder for new users". 
> If we can make things much better for working Javascripters at a small 
> expense to newcomers, that may be a worthwhile trade-off or it may not. We 
> should be open to making wise decisions like that, while remaining 
> sympathetic to everyone who is writing JS.
> 
> I'm a big fan of let, but if you don't deprecate var we're going to have to 
> contend with new programmers keeping two sets of scoping rules in their head.
> 
> I would love to kill var. With fire.
> 
> Generators.... so a function is sometimes a constructor, sometimes a 
> function, and sometimes it's a generator?!?! Explain that in one paragraph 
> that new programmers can understand, I dare you.
> 
> Because I can never refuse a dare...
> 
> A constructor is different from a regular function. Instead of returning the 
> value that the body of the function returns, it returns a special 
> newly-created object. Likewise, a generator is a special function that 
> doesn't return what the body returns. Instead, it returns an object that lets 
> you interrupt and resume that function. This object exposes a next() method. 
> When you call that, the function runs until it hits a yield. When it does, 
> the function is paused at that point, and the result of the yield is returned 
> from next(). The next time you call next() it picks up from there and 
> continues.
> 
> Brendan said something very interesting in his talk at JSConf.eu, he said 
> that because of the way TC39 works any new proposal that doesn't have (and I 
> hope I'm paraphrasing this right) "sexy syntax to start with doesn't have 
> much of a chance".
> 
> Brendan knows better than I, but often I feel that we have the opposite 
> problem. If all you're proposing is syntax, it's easy for anyone to shoot it 
> down by saying "You can already do that now." There's a fundmental difference 
> between utility (can we do it all, ever, regardless of how many fingers we 
> lose in the process) and usability (is it discoverable, easy, clear, 
> pleasurable and not error-prone).
> 
> Because we're programmers we have a tendency to ignore usability concerns 
> because they take more work to demonstrate. We like nice clear boolean 
> switches: "I couldn't do this and now I can!" It's less satisfying for many 
> of us to say "Now people encounter 17% fewer errors when doing this!"
> 
> Personally, I don't think that's the right way to look at things. Arguing 
> from that angle pretty quickly turns into a Turing tarpit. I believe the 
> entire reason we create languages is for usability. I think syntax does 
> matter, because syntax is the user interface of the semantics. I rarely have 
> complaints about JavaScript's semantics (except for var) but I find its 
> notation awkward in some places. Improving those would make me more 
> productive and make JS more fun for me to use.
> 
> - bob
> _______________________________________________
> 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