Hey man, just some feedback on your conversational style:
I find it's quite confrontational and irritating to read.
To me it feels like your trying to score internet points for being right and aren't actually interested in explaining things to people.
It reads more like a Twitter or Reddit thread and I was always very happy to see a calmer more constructive and friendly style on here.
I really don't mean this as a personal attack, I just feel the conversation could have a lot more merit to others (especially newcomers) if it were more constructive.
Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
I'm glad we can all agree that javascript doesn't support pass by reference.
Now, could you show me where in the ecmascript standard it talks about an object value being a reference?
vvvvvv
(First para deleted)
What do you mean that object values are references? I've been fishing through the spec (ecma-international.org/ecma-262/11...) and can't find anything saying so.
Same info and questions, but the second one is showing you're willing to put in some work to find your answer, that we probably fundamentally agree but are stuck on terminology, and will ultimately avoid nag replies like this.
If the language doesn't come naturally to you, try your best to fake it til you make it.
I had a squiz at the spec, couldn't find a specific mention, and ran out of motivation to dig further. The proof though is
a={}b=aa.foo=1console.log(b.foo)// <- prints "1"
For a time, the values of a and brefer to the same object. They hold two pointer-like structures that reference the same shared underlying object. In programming this is often called a reference.
Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
That's fine, but for future reference, let's note that a.foo doesn't mean that a is a reference.
It does mean that a and b have the same value, and it does mean that that value is used to find a particular property named 'foo' and modify that.
Which makes me think that all of this 'reference' stuff is something someone made up to try to explain javascript in terms of a language with references, like C++, but which doesn't quite fit.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey man, just some feedback on your conversational style:
I find it's quite confrontational and irritating to read.
To me it feels like your trying to score internet points for being right and aren't actually interested in explaining things to people.
It reads more like a Twitter or Reddit thread and I was always very happy to see a calmer more constructive and friendly style on here.
I really don't mean this as a personal attack, I just feel the conversation could have a lot more merit to others (especially newcomers) if it were more constructive.
Could you be more specific about the confrontational style that you perceive?
A bit of constructive editing...
vvvvvv
Same info and questions, but the second one is showing you're willing to put in some work to find your answer, that we probably fundamentally agree but are stuck on terminology, and will ultimately avoid nag replies like this.
If the language doesn't come naturally to you, try your best to fake it til you make it.
I had a squiz at the spec, couldn't find a specific mention, and ran out of motivation to dig further. The proof though is
For a time, the values of
a
andb
refer to the same object. They hold two pointer-like structures that reference the same shared underlying object. In programming this is often called a reference.I'm signing off the thread btw
That's fine, but for future reference, let's note that a.foo doesn't mean that a is a reference.
It does mean that a and b have the same value, and it does mean that that value is used to find a particular property named 'foo' and modify that.
Which makes me think that all of this 'reference' stuff is something someone made up to try to explain javascript in terms of a language with references, like C++, but which doesn't quite fit.