> Tiny bike-shed-ish comment that we need a linking punctuator so that
> arrow function syntax can be extended likewise:
>
> var f = function (x, y) : (z) {...}
>
> Arrow form showing expression body:
>
> var f = (x, y) : (z) => x*y/z;
FWIW, I like the semi colon. However, I prefer
| function(x,y):safe(z) { ... }
and
| (x,y):safe(z) => ...
because it enables further markdown annotation to functions, and I'm pretty
sure we will want some more in the future.
I don't know, crazy things like
| function(x,y):tail(...)
for tail-recursion-desired functions, or
| function(x,y):local(...)
for functions that can run on the same callstack because they can only get
called during their closure lifetime (they throw otherwise).
----
The brackets syntax looks reasonable, too, with an optional prelude:
| function(x,y)[z] { ... }
and
| (x,y)[z] => ...
Extensible to:
| function(x,y)[tail(...)]
for tail-recursion-desired functions, or
| function(x,y)[local(...)]
for
functions that can run on the same callstack because they can only get
called during their closure lifetime (they throw otherwise).
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss