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


Groups > comp.lang.javascript > #31708

Re: How to replace a class?

From John Harris <niam@jghnorth.org.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: How to replace a class?
Date 2016-11-12 17:09 +0000
Organization A noiseless patient Spider
Message-ID <kuie2cpu2suqqkb4np2tcv3objsam5jdvb@4ax.com> (permalink)
References (4 earlier) <cc2892c6-e51d-4e61-862f-53a66d842194@googlegroups.com> <XnsA6BCDA38FA080eejj99@194.109.6.166> <1844095.KlZ2vcFHjT@PointedEars.de> <p07b2c967iatbuk2v33b08c7e817feptps@4ax.com> <33637909.10thIPus4b@PointedEars.de>

Show all headers | View raw


On Fri, 11 Nov 2016 12:37:08 +0100, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:

>John Harris wrote:
>
>> […] Thomas 'PointedEars' Lahn […] wrote:
>>> There are no pointers in these languages (except in the low-level
>>> implementation).  The proper term is _reference_.
>> 
>> Unfortunately, ECMA 262 uses 'reference' with several different
>> meanings.
>
>ECMA-262 is irrelevant in that regard.  This is a term borrowed from Java, 
>which JavaScript was designed to resemble, and therefore applicable to all 
>ECMAScript implementations;

This is a policy that will lead to considerable confusion. 

When you, Thomas, write 'property' must we assume you mean a
Java-style property (which is different from an ECMAScript property)?

When you write that a variable's value is an 'integer' must we assume
you mean a 32 bit Java-style integer (which is not an ECMAScript user
type)?


> a term that is used in various object-oriented 
>programming languages (including those that are not implementations of 
>ECMAScript).

In C++ a reference variable has a meaning that is different from the
one you are using.


>“Reference” is to be understood as “reference to an object”.  For in those 
>languages there can be multiple properties referring to the same object, all 
>having the same value – a reference to that object –, and that object can be 
>marked for garbage collection if there are no more references to it.

a) As primitive strings cannot be altered the compiler is allowed to
use a copy-on-write strategy for them. When it does this, the property
value will be implemented as a Java-style reference. So it's not just
"to an object".

b) ECMA 262 does not require that when a property holds an object it
must be implemented as a Java-style reference or pointer. Equally, it
does not prohibit it. Indeed, if two variables hold the same object
the use of pointers, alias references, is very likely; in which case
it might as well be used when there is only one such variable, but it
is *not* a conformance requirement.

c) ECMA 262 does not require a garbage collector, but, as usual,
allows it.


>> The only use of the word with Thomas's meaning is in
>> informal (non-normative) sections and notes. The formal meaning is
>> defined in Section 6.2.3. It is a rather complicated kind of pointer
>> to a property; it is NOT the *value* of the property.
>
>Utter nonsense.

Are you saying that Section 6.2.3 does not exist? Are you saying that
there is no need for ECMA 262 to define a GetValue specification
function for ECMAScript references?

Yes to either would suggest you've gone doolally.

 
>> Therefore
>>   "The proper term is _reference_."
>> should be changed to
>>   "The proper term is _reference_ (informal meaning)."
>
>No, it should not.

Obviously it should.

  John

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-08 18:53 -0800
  Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 07:45 -0800
    Re: How to replace a class? Ram Tobolski <ramtob@gmail.com> - 2016-11-10 10:08 -0800
      Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 11:58 -0800
        Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 13:06 -0800
          Re: How to replace a class? Ram Tobolski <ramtob@gmail.com> - 2016-11-10 13:37 -0800
            Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 14:09 -0800
              Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-11 00:01 +0100
          Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-10 22:51 +0100
            Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 14:09 -0800
        Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-10 23:20 +0100
          Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-11 10:24 +0000
            Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-11 12:37 +0100
              Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-12 17:09 +0000
          Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-11 10:41 +0000
            Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-11 12:43 +0100
              Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-11 14:52 +0100
                Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-11 15:11 +0100
                Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-11 15:30 +0100
                Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-11 16:41 +0100
                Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-11 23:54 +0100
              Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-12 18:42 +0000
            Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-11 14:46 +0100
              Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-12 14:51 +0000
                Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-12 20:13 +0100
                Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-12 11:35 -0800
                Re: How to replace a class? John Harris <niam@jghnorth.org.uk.invalid> - 2016-11-13 11:13 +0000
      Re: How to replace a class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-11-10 23:11 +0100
        Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 15:08 -0800
    Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-10 20:37 +0100
      Re: How to replace a class? justaguy <lichunshen84@gmail.com> - 2016-11-10 11:59 -0800
        Re: How to replace a class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-10 21:01 +0100

csiph-web