Jacob Parker wrote:
In the context of only objects and classes, is this format no-go?
Without the } that closes a concise method body, there's a new problem
to-do with computed property names:
class C {
m() this._m
[Symbol.iterator]() {/*...*/}
}
We need a delimiter. Could use ;
Could the comma not be the delimiter, as I think works with arrow
functions, or is that more precedence issues?
On Wed, 25 Mar 2015 8:37 am Brendan Eich bren...@mozilla.org wrote:
Jacob Parker wrote:
In the context of only objects and classes, is this format no-go?
Without the } that closes
Jacob Parker wrote:
Could the comma not be the delimiter, as I think works with arrow
functions, or is that more precedence issues?
No precedence issue, due to AssignmentExpression (not Expression) being
the right-most non-terminal produced by the unbraced alternative for
ConciseBody.
...@gmail.com
Cc: es-discuss@mozilla.org
Date: Wed, 25 Mar 2015 14:30:28 +0100
Subject: Re: Expression Closures as Compliment to Arrow Functions
Jacob Parker wrote:
Could the comma not be the delimiter, as I think works with arrow
functions, or is that more precedence issues?
No precedence
Brendan Eich wrote:
var y = (a) = a ? f : x++ (1);
evaluated (or is it syntactically valid at all)?
The problem with expression closures is precedence inversion: you have
LowPrec ~~ HighPrec ~~ stuff ending with LowPrec. The particular
nonterminals are AssignmentExpression and
Bergi wrote:
Jacob Parker schrieb:
Either I'm wrong, or that's missing some parens. Assume the following
(the
only interpretation I can see to not throw a syntax error),
var y = (function (a) a ? f : x++)(1);
In which case, that could only return `f`, which when printed should
print
Jacob Parker wrote:
Either I'm wrong, or that's missing some parens.
No, test it yourself in Firefox (s/print/console.log/) or SpiderMonkey.
Assume the following (the only interpretation I can see to not throw a
syntax error),
var y = (function (a) a ? f : x++)(1);
In which case, that
Jacob Parker schrieb:
Either I'm wrong, or that's missing some parens. Assume the following (the
only interpretation I can see to not throw a syntax error),
var y = (function (a) a ? f : x++)(1);
In which case, that could only return `f`, which when printed should print
the source of f,
In the context of only objects and classes, is this format no-go?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Either I'm wrong, or that's missing some parens. Assume the following (the
only interpretation I can see to not throw a syntax error),
var y = (function (a) a ? f : x++)(1);
In which case, that could only return `f`, which when printed should print
the source of f, no?
FWIW, the consise
On Mar 23, 2015, at 10:42 AM, Jacob Parker jacobparker1...@gmail.com
mailto:jacobparker1...@gmail.com wrote:
I noticed expression closures, as defined below, have been excluded from the
spec.
Allen Wirfs-Brock wrote:
including these, in addition to the existing shorthand syntaxes,
should make the following examples work.
var x = { value: 3, toString() 'string', valueOf() this.value };
class x { constructor { this.value = 3; } valueOf() this.value }
what you show above
12 matches
Mail list logo