Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35802 > unrolled thread

Will this send it into an infinite loop?

Started bygroovee@cyberdude.com
First post2018-11-02 11:14 -0700
Last post2018-11-03 14:37 +0000
Articles 9 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  Will this send it into an infinite loop? groovee@cyberdude.com - 2018-11-02 11:14 -0700
    Re: Will this send it into an infinite loop? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-11-03 10:47 +0100
      Re: Will this send it into an infinite loop? groovee@cyberdude.com - 2018-11-06 09:56 -0800
        Re: Will this send it into an infinite loop? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-11-06 23:12 +0100
          Re: Will this send it into an infinite loop? groovee@cyberdude.com - 2018-11-08 03:02 -0800
            Re: Will this send it into an infinite loop? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-11-08 12:23 +0100
              Re: Will this send it into an infinite loop? groovee@cyberdude.com - 2018-11-09 02:37 -0800
                Re: Will this send it into an infinite loop? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-11-09 17:42 +0100
    Re: Will this send it into an infinite loop? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-11-03 14:37 +0000

#35802 — Will this send it into an infinite loop?

Fromgroovee@cyberdude.com
Date2018-11-02 11:14 -0700
SubjectWill this send it into an infinite loop?
Message-ID<ddb7393a-b335-4585-9d17-e21eb1fdb2fd@googlegroups.com>
function Set() {
blah blah

let intersectionSet = new Set();

}

Will this send it into an infinite loop when the "Set" class is instantiated? If not, why not?

[toc] | [next] | [standalone]


#35803

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-11-03 10:47 +0100
Message-ID<XnsA98F6DBE713D9eejj99@194.109.6.166>
In reply to#35802
groovee@cyberdude.com wrote on 02 Nov 2018 in comp.lang.javascript:

> function Set() {
> blah blah
> 
> let intersectionSet = new Set();
> 
>}
> 
> Will this send it into an infinite loop when the "Set" class is
> instantiated? If not, why not? 

Did you test it?

If so, what was the result, and on what engine?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35805

Fromgroovee@cyberdude.com
Date2018-11-06 09:56 -0800
Message-ID<86f274b7-08fd-4c62-91da-ea6506983f4e@googlegroups.com>
In reply to#35803
On Saturday, 3 November 2018 15:17:42 UTC+5:30, Evertjan.  wrote:

> 
> Did you test it?
> 
> If so, what was the result, and on what engine?
> 

Uhh no - actually I read suchlike code in a book I was reading, which struck me as Very Peculiar, which is why I decided to ask here straightaway....

[toc] | [prev] | [next] | [standalone]


#35806

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-11-06 23:12 +0100
Message-ID<XnsA992EC279C642eejj99@194.109.6.166>
In reply to#35805
groovee@cyberdude.com wrote on 06 Nov 2018 in comp.lang.javascript:

> On Saturday, 3 November 2018 15:17:42 UTC+5:30, Evertjan.  wrote:
> 
>> 
>> Did you test it?
>> 
>> If so, what was the result, and on what engine?
>> 
> 
> Uhh no - actually I read suchlike code in a book I was reading, which
> struck me as Very Peculiar, which is why I decided to ask here
> straightaway.... 

Don't you think that is the wrong approach, 
if and when you want to learn something about Javascript?


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35807

Fromgroovee@cyberdude.com
Date2018-11-08 03:02 -0800
Message-ID<2d59f656-7315-4f84-a49c-79c65406ae3c@googlegroups.com>
In reply to#35806
On Wednesday, 7 November 2018 03:43:10 UTC+5:30, Evertjan.  wrote:

> Don't you think that is the wrong approach, 
> if and when you want to learn something about Javascript?

Uhh...some times you want some *human interaction*, steadof just...sitting there with a book and the computer, you know...? :) I don't have like, a teacher in real life teaching me this stuff....?
Whatever :)

[toc] | [prev] | [next] | [standalone]


#35808

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-11-08 12:23 +0100
Message-ID<XnsA9947E06F282Ceejj99@194.109.6.166>
In reply to#35807
groovee@cyberdude.com wrote on 08 Nov 2018 in comp.lang.javascript:

> On Wednesday, 7 November 2018 03:43:10 UTC+5:30, Evertjan.  wrote:
> 
>> Don't you think that is the wrong approach, 
>> if and when you want to learn something about Javascript?
> 
> Uhh...some times you want some *human interaction*, steadof
> just...sitting there with a book and the computer, you know...? :) I
> don't have like, a teacher in real life teaching me this stuff....? 

Well, it sounds more like 12 year old asking his or her mother:
"Can you please tie my shoelaces"
without first trying to do it him- or herself.

That 'can' be needed to force human interaction indeed.

> Whatever :) 

Rather.

Oh sorry, modern youths walk around with untied shoelaces, I am told,
and prefer to occasionally fall flat on their faces and skin their noses.
This can easily be done with Javascript too.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35809

Fromgroovee@cyberdude.com
Date2018-11-09 02:37 -0800
Message-ID<84c1f9c8-c7a3-4e57-9f3e-6a88ab7dc41b@googlegroups.com>
In reply to#35808
On Thursday, 8 November 2018 16:53:23 UTC+5:30, Evertjan.  wrote:

> Oh sorry, modern youths walk around with untied shoelaces, I am told,
> and prefer to occasionally fall flat on their faces and skin their noses.
> This can easily be done with Javascript too.
> 

Umm...."tying my own shoelaces" wouldn't have answered the question "If not, WHY not"....

[toc] | [prev] | [next] | [standalone]


#35810

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-11-09 17:42 +0100
Message-ID<XnsA995B419F2528eejj99@194.109.6.166>
In reply to#35809
groovee@cyberdude.com wrote on 09 Nov 2018 in comp.lang.javascript:

> On Thursday, 8 November 2018 16:53:23 UTC+5:30, Evertjan.  wrote:
> 
>> Oh sorry, modern youths walk around with untied shoelaces, I am told,
>> and prefer to occasionally fall flat on their faces and skin their
>> noses. This can easily be done with Javascript too.
>> 
> 
> Umm...."tying my own shoelaces" wouldn't have answered the question "If
> not, WHY not".... 

Perhaps their shoes have unties,
like undies are white if undyed?
or modern youths feel undied?

In general the nul-hypothesis is that something specific is NOT so,
and then "why not?" is only psychologically important.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35804

FromJohn G Harris <niam@jghnorth.org.uk.invalid>
Date2018-11-03 14:37 +0000
Message-ID<kkcrtdteb96evtqf0grkohevg30qpsqgj4@4ax.com>
In reply to#35802
On Fri, 2 Nov 2018 11:14:12 -0700 (PDT), groovee@cyberdude.com wrote:

>function Set() {
>blah blah
>
>let intersectionSet = new Set();
>
>}
>
>Will this send it into an infinite loop when the "Set" class is instantiated? If not, why not?

It won't be an *infinite* loop. At best, after a billion or so
iterations your PC will run out of room for more objects and stop or
squeal or something else dramatic.

In practice, it will probably stop after fewer iterations.

  John

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web