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


Groups > comp.lang.javascript > #29150

Re: array-like objects

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: array-like objects
Date 2016-01-05 20:13 +0100
Organization PointedEars Software (PES)
Message-ID <2389107.ZQXF91zPQe@PointedEars.de> (permalink)
References (3 earlier) <mogi8b9fm10hhucptq5lq851t60o3aicvv@4ax.com> <15615987.a6MfTLryX4@PointedEars.de> <j1lk8bpjhqpg7drkpai4oga2aijpvr6vke@4ax.com> <4796632.tdeKqXnCYY@PointedEars.de> <etsn8bh75aegndr471r7s8agqa5rjr5u46@4ax.com>

Show all headers | View raw


John Harris wrote:

> On Mon, 04 Jan 2016 15:27:13 +0100, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> wrote:
>> John Harris wrote:
>>> On Sun, 03 Jan 2016 16:59:02 +0100, Thomas 'PointedEars' Lahn
>>> <PointedEars@web.de> wrote:
>> Attribution *line*, _not_ attribution novel.
> 
> Agent won't let me make it one line.

I strongly doubt that your software is that b0rked that it would not allow 
you to edit that part of the posting before you submit it, if all else 
fails.

> If you don't like it complain to Forte.

Why should *I*?  *You* would be the user using software intended for use 
with Usenet that is as far as is known inadequate to the task.  So, short of 
stopping to post to Usenet, *you* can find out how to configure the software 
appropriately (there are newsgroups for that if the software manual does not 
suffice), work around its flaws (e.g., with MorVer; since it is unfree 
closed source software, you cannot edit and recompile the source code), edit 
the attribution before posting, switch to better software, or complain to 
the vendor.  Since it is Forté Agent, and Forté *Free* Agent, you paid for 
the software, so you have a right to good product quality and it is *your* 
privilege and responsibility to exercise that right.

Reasonably, my choice as one of your readers includes only to killfile you 
for not doing either of that, since *you* are making threads in which *you* 
participate harder to read.

>>> The syntax says
>>>   identifier_b = identifier_a ;
>>> The semantics are complicated. They say
>>>   If    The storage area associated with identifier_a holds a
>>>         primitive (non-object) value
>>>   Then  The storage area associated with identifier_b will now also
>>>         hold this primitive value, but a different instance of it
>>>   Else  The object associated with identifier_a will now also be
>>>         associated with identifier_b
>>>         (Note : there are other ways of saying this)
>>
>>How did you get that idea?
> 
> By reading ECMA 262.

If you think that ECMA-262 (which Edition?) is confirming your ideas, then 
you will have no difficulty citing the corresponding algorithms and 
referring explicitly to the relevant parts.

> Where don't you agree?

I do not agree with your idea as a whole.  Also, ECMAScript does not specify 
implementation behavior in such a detail as that would hinder the 
flexibility of implementations, so it is highly doubtful at best that you 
can substantiate your claim.

In particular, for an implementation it is far easier to always copy the 
memory content on simple assignment, and have the memory content define what 
type of ECMAScript value is being stored.  IOW, it stands to reason that 
object references are simply values and only treated specially in a property 
access.

For example, although my C is a bit rusty, different to your idea, in C it 
makes a lot more sense to me to handle an ECMAScript value as one of a type 
struct with fields for the values of every built-in primitive type except 
String, one pointer field for String (since IIRC, strings in C of arbitrary 
length are implemented as pointers of char) and one for object types, the 
latter two pointing to an address in the heap where the memory area for the 
actual object value starts, and finally one field indicating the stored type 
(so that you know which of the value fields of the struct contains or refers 
to the stored value; I would define and use numeric constants for that).  
Then, when the identifier reference has been resolved to a value, you look 
at the type field of the struct and determine what to do if the identifier 
is the base of a property access (values of built-in primitive types need to 
be converted to values of corresponding built-in object types internally 
before property access is possible; or, maybe you can save more memory and 
runtime if you always treat values as objects to begin with – IIRC, someone 
here has posted their research on a major implementation to that effect).

In any case, your newest attempt of trying to shift the burden of proof is 
unsuccessful.

<https://yourlogicalfallacyis.com/burden-of-proof>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

Re: array-like objects Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-02 13:27 -0200
  Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-02 20:48 +0100
    Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-03 15:50 +0000
      Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-03 16:59 +0100
        Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-04 11:15 +0000
          Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-04 15:27 +0100
            Re: array-like objects Tim Streater <timstreater@greenbee.net> - 2016-01-04 15:57 +0000
            Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-05 16:47 +0000
              Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-05 20:13 +0100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-06 16:24 +0000
                Re: array-like objects Aleksandro <aleksandro@gmx.com> - 2016-01-06 14:45 -0300
                Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-06 19:27 +0100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-07 11:00 +0000
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-08 17:02 +0000
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-09 20:07 +0000
                Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-10 09:03 +0100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-10 10:03 +0000
                Re: array-like objects Andrew Poulos <ap_prog@hotmail.com> - 2016-01-10 23:21 +1100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-10 15:59 +0000
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-10 15:30 +0000
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-11 11:03 +0000
                Re: array-like objects "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-01-11 10:36 -0800
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-01-12 10:59 +0000
                Re: array-like objects "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-01-12 12:47 +0100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-06 10:50 +0000
                Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-09 05:01 +0100
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-09 19:07 +0000
                Re: array-like objects John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-09 19:23 +0000
  Re: array-like objects Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-01-03 04:26 -0800
    Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-03 16:54 +0100
      Re: array-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-04 00:18 +0100

csiph-web