arrow syntax unnecessary and the idea that "function" is too long
Sam Tobin-Hochstadt
samth at ccs.neu.edu
Sat May 7 06:04:48 PDT 2011
On Sat, May 7, 2011 at 2:22 AM, Peter Michaux <petermichaux at gmail.com> wrote:
>
> I think that this is what compilers and projects like coffeescript are
> for. In my opinion, JavaScript itself doesn't need this new syntax.
>
> I think improving JavaScript as a compilation target is a good goal.
This argument comes up time and again: "We don't need to make
JavaScript a good programming language, just a good compilation
target". I think it's really wrong-headed. First, JavaScript is a
language used by millions of people as a programming language, and we
should give them a great language to program in. Second, JavaScript
as source rather than target has been a huge enabler of the Web as an
open platform, which I certainly don't want to move away from. So,
even though we've worked hard in the module system to better support
compilation to JavaScript, I think the our fundamental goal should be
to make JavaScript a great language to write all kinds of programs in.
> For example, a real "lambda" with guaranteed proper tail calls, no
> "arguments", no need for "return", etc would make is possible to
> compile Scheme to JavaScript without using something inefficient like
> trampolines. It would also open up recursive programming options in
> plain JavaScript so it would be win-win.
And hey, it turns out we've done this too -- at least with the -> syntax. :)
--
sam th
samth at ccs.neu.edu
More information about the es-discuss
mailing list