It seems that it would be wise to use def, fn, or fun for function definitions similar to Ruby or other succinct languages.
Now that it’s too late to change things due to potential compatibility issues, the whole world is forced to suffer using that wasteful long name ‘function’ everywhere in JavaScript code.
I don’t know if I would call it a “big mistake.” But I do occasionally wish for something shorter, though. I’d want to use a special syntax, something like
|a,b|{return a+b;}or even better,|a,b|{a+b}if it could implicitly determine thereturnfor short expressions.Sigh…
On the other hand, so we don’t go away from this question feeling depressed, isn’t it AWESOME how we have great shorthands for object and array literals in javascript? So awesome it brought us JSON! If you ask me, the data structure shorthands are much more important anyway, so cheer up. ^_^