Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36554 > unrolled thread
| Started by | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| First post | 2019-05-03 09:46 +0100 |
| Last post | 2019-05-05 05:09 -0700 |
| Articles | 8 — 2 participants |
Back to article view | Back to comp.lang.javascript
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: "use strict"; in a recent Firefox John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-03 09:46 +0100
Re: "use strict"; in a recent Firefox Julio Di Egidio <julio@diegidio.name> - 2019-05-04 05:16 -0700
Re: "use strict"; in a recent Firefox John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-04 14:51 +0100
Re: "use strict"; in a recent Firefox Julio Di Egidio <julio@diegidio.name> - 2019-05-04 07:58 -0700
Re: "use strict"; in a recent Firefox Julio Di Egidio <julio@diegidio.name> - 2019-05-04 08:10 -0700
Re: "use strict"; in a recent Firefox John G Harris <niam@jghnorth.org.uk.invalid> - 2019-05-04 19:02 +0100
Re: "use strict"; in a recent Firefox Julio Di Egidio <julio@diegidio.name> - 2019-05-05 05:02 -0700
Re: "use strict"; in a recent Firefox Julio Di Egidio <julio@diegidio.name> - 2019-05-05 05:09 -0700
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2019-05-03 09:46 +0100 |
| Subject | Re: "use strict"; in a recent Firefox |
| Message-ID | <stvnce9jnc6pdb6kfku6sf2aa8nauciiqu@4ax.com> |
On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
> I read on a webpage that duplicate keys were detected in
> strict mode. I cannot see this with a recent Firefox:
>
>|>> "use strict"; ({ a: 2, a: 3 })
>|<- Object { a: 3 }
>
> . Ok, so, the explanation is:
>
> Duplicate keys are now legal since ES6, even in strict mode!
It's a duplicate assignment to a property. It's redundent, but it
doesn't sound very contraversial even though it's likely to be a
typing error.
John
[toc] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-05-04 05:16 -0700 |
| Message-ID | <ab288b65-a363-48da-be52-4491f2f98889@googlegroups.com> |
| In reply to | #36554 |
On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote:
> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>
> > I read on a webpage that duplicate keys were detected in
> > strict mode. I cannot see this with a recent Firefox:
> >
> >|>> "use strict"; ({ a: 2, a: 3 })
> >|<- Object { a: 3 }
> >
> > . Ok, so, the explanation is:
> >
> > Duplicate keys are now legal since ES6, even in strict mode!
>
> It's a duplicate assignment to a property. It's redundent, but it
> doesn't sound very contraversial even though it's likely to be a
> typing error.
Another improvement...
is controversial only in a realm where debate is allowed and possible.
ES<=5 wasn't perfect, anyway quite a wonderful language and easily fixable;
ES>5 is plain marketing stunt and yet another piece of the global shame and
disaster.
Julio
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2019-05-04 14:51 +0100 |
| Message-ID | <j56rce9gd8hmrsv6vrmr9cbv67t6j7t8g8@4ax.com> |
| In reply to | #36569 |
On Sat, 4 May 2019 05:16:19 -0700 (PDT), Julio Di Egidio
<julio@diegidio.name> wrote:
>On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote:
>> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>>
>> > I read on a webpage that duplicate keys were detected in
>> > strict mode. I cannot see this with a recent Firefox:
>> >
>> >|>> "use strict"; ({ a: 2, a: 3 })
>> >|<- Object { a: 3 }
>> >
>> > . Ok, so, the explanation is:
>> >
>> > Duplicate keys are now legal since ES6, even in strict mode!
>>
>> It's a duplicate assignment to a property. It's redundent, but it
>> doesn't sound very contraversial even though it's likely to be a
>> typing error.
>
>Another improvement...
<snip>
Not an improvement. It appeared in ES5, when strict first appeared,
and taken out in ES6.
A problem in the ES5 version was that in strict mode the semantics of
a = { b:5, b,7 };
were differenct from the semantics of
a = { }; a.b=5; a.b=7;
It's better to look for possible typing errors with a lint program.
John
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-05-04 07:58 -0700 |
| Message-ID | <3feeea75-db0c-4b6c-ab61-d07e208dd6de@googlegroups.com> |
| In reply to | #36572 |
On Saturday, 4 May 2019 15:51:21 UTC+2, John G Harris wrote:
> On Sat, 4 May 2019 05:16:19 -0700 (PDT), Julio Di Egidio
> <julio@diegidio.name> wrote:
> >On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote:
> >> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
> >>
> >> > I read on a webpage that duplicate keys were detected in
> >> > strict mode. I cannot see this with a recent Firefox:
> >> >
> >> >|>> "use strict"; ({ a: 2, a: 3 })
> >> >|<- Object { a: 3 }
> >> >
> >> > . Ok, so, the explanation is:
> >> >
> >> > Duplicate keys are now legal since ES6, even in strict mode!
> >>
> >> It's a duplicate assignment to a property. It's redundent, but it
> >> doesn't sound very contraversial even though it's likely to be a
> >> typing error.
> >
> >Another improvement...
> <snip>
BTW, as usual, you just snip my actual objection to you and your nonsense
about what's actually controversial.
> Not an improvement. It appeared in ES5, when strict first appeared,
> and taken out in ES6.
FYI, that's the opposite of not just what I know but also what Ram's
just said above:
"Duplicate keys are now legal since ES6, even in strict mode!"
Get a grip, either one or the other...
> A problem in the ES5 version was that in strict mode the semantics of
> a = { b:5, b,7 };
>
> were differenct from the semantics of
> a = { }; a.b=5; a.b=7;
Total nonsense: besides that a difference per se isn't any problem, if
duplicate keys are *not* allowed, not only it's arguably *less* error
prone, it's also fuck all to do with semantics, for what you rather get
is a *syntax error*.
> It's better to look for possible typing errors with a lint program.
It's better to write good code to begin with, and linting is well known
*not* to be any panacea nor any license to be sloppy or incompetent,
in fact rather take it cum grano salis.
Julio
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-05-04 08:10 -0700 |
| Message-ID | <4a29b5df-ad99-42bd-a6a9-b8a90aea2788@googlegroups.com> |
| In reply to | #36573 |
On Saturday, 4 May 2019 16:58:47 UTC+2, Julio Di Egidio wrote: > On Saturday, 4 May 2019 15:51:21 UTC+2, John G Harris wrote: > > On Sat, 4 May 2019 05:16:19 -0700 (PDT), Julio Di Egidio > > <julio@diegidio.name> wrote: > > >On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote: > > >> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote: <snip> > > >> > Duplicate keys are now legal since ES6, even in strict mode! > > >> > > >> It's a duplicate assignment to a property. It's redundent, but it > > >> doesn't sound very contraversial even though it's likely to be a > > >> typing error. > > > > > >Another improvement... > > <snip> > > BTW, as usual, you just snip my actual objection to you and your nonsense > about what's actually controversial. And to the point that you make it seem I am saying the very opposite than I have actually said, you piece of scum... Julio
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2019-05-04 19:02 +0100 |
| Message-ID | <btkrce5fnp3dm8crqnrcie1ajte0asu5do@4ax.com> |
| In reply to | #36573 |
On Sat, 4 May 2019 07:58:37 -0700 (PDT), Julio Di Egidio
<julio@diegidio.name> wrote:
>On Saturday, 4 May 2019 15:51:21 UTC+2, John G Harris wrote:
>> On Sat, 4 May 2019 05:16:19 -0700 (PDT), Julio Di Egidio
>> <julio@diegidio.name> wrote:
>> >On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote:
>> >> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
>> >>
>> >> > I read on a webpage that duplicate keys were detected in
>> >> > strict mode. I cannot see this with a recent Firefox:
>> >> >
>> >> >|>> "use strict"; ({ a: 2, a: 3 })
>> >> >|<- Object { a: 3 }
>> >> >
>> >> > . Ok, so, the explanation is:
>> >> >
>> >> > Duplicate keys are now legal since ES6, even in strict mode!
>> >>
>> >> It's a duplicate assignment to a property. It's redundent, but it
>> >> doesn't sound very contraversial even though it's likely to be a
>> >> typing error.
>> >
>> >Another improvement...
>> <snip>
>
>BTW, as usual, you just snip my actual objection to you and your nonsense
>about what's actually controversial.
I wasn't commenting on your objection so your reply is invalid.
>> Not an improvement. It appeared in ES5, when strict first appeared,
>> and taken out in ES6.
>
>FYI, that's the opposite of not just what I know but also what Ram's
>just said above:
It depends what the "It" means. To rephrase : ES5 introduced "strict",
and said that in strict mode duplicate declaration of values for the
same property are banned in an Object Initialiser. ES6 removed that
ban. It has never been banned in non-strict mode.
> "Duplicate keys are now legal since ES6, even in strict mode!"
<snip>
There was no strict mode in ES3 and ES2 so "since ES6" could mislead.
John
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-05-05 05:02 -0700 |
| Message-ID | <d859cdd6-5f42-4b57-a8ce-09d1757a7ce7@googlegroups.com> |
| In reply to | #36575 |
On Saturday, 4 May 2019 20:03:00 UTC+2, John G Harris wrote:
> On Sat, 4 May 2019 07:58:37 -0700 (PDT), Julio Di Egidio
> <julio@diegidio.name> wrote:
> >On Saturday, 4 May 2019 15:51:21 UTC+2, John G Harris wrote:
> >> On Sat, 4 May 2019 05:16:19 -0700 (PDT), Julio Di Egidio
> >> <julio@diegidio.name> wrote:
> >> >On Friday, 3 May 2019 10:46:10 UTC+2, John G Harris wrote:
> >> >> On 2 May 2019 19:01:49 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote:
> >> >>
> >> >> > I read on a webpage that duplicate keys were detected in
> >> >> > strict mode. I cannot see this with a recent Firefox:
> >> >> >
> >> >> >|>> "use strict"; ({ a: 2, a: 3 })
> >> >> >|<- Object { a: 3 }
> >> >> >
> >> >> > . Ok, so, the explanation is:
> >> >> >
> >> >> > Duplicate keys are now legal since ES6, even in strict mode!
> >> >>
> >> >> It's a duplicate assignment to a property. It's redundent, but it
> >> >> doesn't sound very contraversial even though it's likely to be a
> >> >> typing error.
> >> >
> >> >Another improvement...
> >> <snip>
> >
> >BTW, as usual, you just snip my actual objection to you and your nonsense
> >about what's actually controversial.
>
> I wasn't commenting on your objection so your reply is invalid.
But you have replied to me, not to Ram, plus snipping it in such a way as
to make it seem I am saying the opposite of what I have said.
Get a grip...
Julio
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-05-05 05:09 -0700 |
| Message-ID | <2741fb76-bf56-4c5f-ae41-5ee89bc714e8@googlegroups.com> |
| In reply to | #36575 |
On Saturday, 4 May 2019 20:03:00 UTC+2, John G Harris wrote: <snip> > To rephrase : ES5 introduced "strict", > and said that in strict mode duplicate declaration of values for the > same property are banned in an Object Initialiser. ES6 removed that > ban. It has never been banned in non-strict mode. As said, what an improvement... Julio
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web