On 11/13/2016 12:33 PM, Isiah Meadows wrote:
> Okay. Is it a spec bug then? Throwing a ReferenceError is surprising and odd
> IMHO.
I think so -- having different sorts of early errors makes it a little less
clear what sort of error should be thrown when two early errors of different
types are
On 11/15/16 1:57 PM, Claude Pache wrote:
My guess is that Thaddee Tyl was confused by a Chrome DevTools feature, as in:
I considered that, but I actually got consistent results both in
Chrome's console and in a webpage...
-Boris
___
es-discuss
> Le 14 nov. 2016 à 22:53, Boris Zbarsky a écrit :
>
>> On 11/13/16 1:28 PM, Thaddee Tyl wrote:
>>var foo, bar;
>>{foo, bar} = {foo: 2, bar: 3};
>>
>> is a "SyntaxError: expected expression, got '='" in Firefox, and *it
>> works in Google Chrome*.
>
> I get
On 11/13/16 1:28 PM, Thaddee Tyl wrote:
var foo, bar;
{foo, bar} = {foo: 2, bar: 3};
is a "SyntaxError: expected expression, got '='" in Firefox, and *it
works in Google Chrome*.
I get "Uncaught SyntaxError: Unexpected token =" in Chrome "56.0.2914.3
dev" and in Chrome "54.0.2840.9"
Okay. Is it a spec bug then? Throwing a ReferenceError is surprising and
odd IMHO.
On Sun, Nov 13, 2016, 14:45 Allen Wirfs-Brock wrote:
> On Nov 13, 2016, at 10:49 AM, Isiah Meadows
> wrote:
>
> Firefox likely has a parser bug (it should never
> On Nov 13, 2016, at 10:49 AM, Isiah Meadows wrote:
>
> Firefox likely has a parser bug (it should never throw a ReferenceError in
> that situation).
>
>
FireFox is correct, Chrome is wrong. See the second early error rule at
er 17, 2013 10:06 AM
> >> I'm wondering what the best syntax is for object destructuring outside
> of
> >> a var declaration. For instance, the following works in Firefox
> Nightly and
> >> Traceur:
> >>
> >> […]
> >>
> >>
2013 at 4:27 PM, Brendan Eich <bren...@mozilla.com> wrote:
> >> Nathan Wall <mailto:nathan.w...@live.com>
> >> September 17, 2013 10:06 AM
> >> I'm wondering what the best syntax is for object destructuring outside
> of
> >> a var declarat
On Tue, Sep 17, 2013 at 4:27 PM, Brendan Eich <bren...@mozilla.com> wrote:
>> Nathan Wall <mailto:nathan.w...@live.com>
>> September 17, 2013 10:06 AM
>> I'm wondering what the best syntax is for object destructuring outside of
>> a var declaration. For inst
I'm wondering what the best syntax is for object destructuring outside of a var
declaration. For instance, the following works in Firefox Nightly and Traceur:
var { a, b } = foo;
but the following doesn't:
var a, b;{ a, b } = foo;
I presume this is because in the second case
Nathan Wall mailto:nathan.w...@live.com
September 17, 2013 10:06 AM
I'm wondering what the best syntax is for object destructuring outside
of a var declaration. For instance, the following works in Firefox
Nightly and Traceur:
var { a, b } = foo;
but the following doesn't:
var a, b
.
/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Nathan Wall mailto:nathan.w...@live.com
September 17, 2013 10:06 AM
I'm wondering what the best syntax is for object destructuring outside
of a var declaration. For instance
I say use var/let/const, it's better style; or else suffer a parentheses tax.
This is pretty much a non-issue in practice, AFAICT.
I don’t think so, either. But error message could give appropriate hints, just
in case (beyond the scope of TC39/ECMA-262, but still important,
usability-wise).
13 matches
Mail list logo