experchange > javascript

groovee (11-02-18, 08:14 PM)
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?
Evertjan. (11-03-18, 11:47 AM)
groovee 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?
John G Harris (11-03-18, 04:37 PM)
On Fri, 2 Nov 2018 11:14:12 -0700 (PDT), groovee 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
groovee (11-06-18, 07:56 PM)
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....
Evertjan. (11-07-18, 12:12 AM)
groovee 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?
groovee (11-08-18, 01:02 PM)
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 :)
Evertjan. (11-08-18, 01:23 PM)
groovee 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.
groovee (11-09-18, 12:37 PM)
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"....
Evertjan. (11-09-18, 06:42 PM)
groovee 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.
Similar Threads