Russell Leggett wrote:
On Sat, Mar 10, 2012 at 3:10 PM, Herby Vojčík he...@mailbox.sk
mailto:he...@mailbox.sk wrote:
Hello,
to see the problem various syntaxes can bring, various crazy code
samples should be written in each of them to see if and how hard can
they be used, and
Le 10/03/2012 23:03, Brandon Benvie a écrit :
I submitted this as a potential security vulnerability to the Chromium
bug list but it didn't seem to register there. It's not a
vulnerability in that it has an imminent impact on anything, but I
would still classify it as one because of the
== Arrow syntax ==
The nicest proposal I have seen has been written by David Herman:
https://gist.github.com/2011902
== More traditional solution ==
1. Short notation for non-TCP functions: use fn; enables one to abbreviate
function as fn [1]. Optional, not sure if that’s a good idea: Implicit
Add such examples. I made it editable for anyone exactly for that reason - to
add code samples they see as relevant.
Will do
- Russ
Herby
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I think it's a good summary of current state of the art. Personally, I'm
all-in with do(args){} syntax because it's the syntax that best fit (my)
intuition a well as the current ES syntax (both of a function and of a
block). The arrow syntax is ackward and requires you to read upto the arrow
BTW, if we are still going to make 'fn' optionnal, I have one small question:
wouldn't it better to allow functions without introductory keyword instead?
If it's optionnal, it's up to the developer that uses it to make sure his
code is compatible, which seems fine to me.
With introductory
Not at all. If anything, I have a slight preference for the traditional
solution.
On Mar 11, 2012, at 14:52 , François REMY wrote:
Stunned to read that from someone asking for the arrow syntax, but yes, it’s
right.
From: Axel Rauschmayer
Sent: Sunday, March 11, 2012 2:46 PM
To:
The nicest proposal I have seen has been written by David Herman:
https://gist.github.com/2011902
Commenting on the gist proposals:
G1. shorter function syntax: (..) - {..}just sugar for function
(..) {..}
This looks like a strawman, not solving the issues.
G2. lambdas:(..) =
see https://gist.github.com/2015544 for my current thougthts
Allen
On Mar 11, 2012, at 11:20 AM, Axel Rauschmayer wrote:
== Arrow syntax ==
The nicest proposal I have seen has been written by David Herman:
https://gist.github.com/2011902
== More traditional solution ==
1. Short
+1
Great. Very JavaScript-y syntax, easy to parse. David’s `do {}` fits in nicely
as an IIDE (immediately-invoked do expression). In fact, your proposal does
indeed seem like a natural evolution of `do {}` (TCP, completion value
semantics, etc.), rather like a “parameterized do”.
I like `use
Axel Rauschmayer wrote:
I like `use fn`, but it’s not yet clear to me how it interacts with
modules (including, possibly, `use module`)
use module;
was withdrawn.
use fn;
is just a pragma to make fn short for function. You can still write
'function' out.
. I would prefer to have an “all
11 matches
Mail list logo