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


Groups > comp.lang.javascript > #38256

Re: Object values (continued)

From Jon Ribbens <jon+usenet@unequivocal.eu>
Newsgroups comp.lang.javascript
Subject Re: Object values (continued)
Date 2020-03-17 19:55 +0000
Organization A noiseless patient Spider
Message-ID <slrnr72aq2.bf0.jon+usenet@sable.unequivocal.eu> (permalink)
References <8f3v6ft5nntnuc7qi27q8if1crb40499hp@4ax.com> <slrnr6v4ks.43a.jon+usenet@sable.unequivocal.eu> <2ogv6fld7ftt6pbe2c8ckod3u9mo76g18r@4ax.com> <slrnr6vn1f.43a.jon+usenet@sable.unequivocal.eu> <ki727fh62dfuqip6lnose5s1gh9vgfruch@4ax.com>

Show all headers | View raw


On 2020-03-17, John G Harris <niam@jghnorth.org.uk.invalid> wrote:
> On Mon, 16 Mar 2020 20:06:07 -0000 (UTC), Jon Ribbens
><jon+usenet@unequivocal.eu> wrote:
>>On 2020-03-16, John G Harris <niam@jghnorth.org.uk.invalid> wrote:
>  <snip>
>>No, I mean the bit where you said:
>>
>>> There is a way to implement values that puts an object right inside
>>> the value field, yet allows several variables/properties to share
>>> the same object. As a bonus, this way solves the large string
>>> problem without any extra code.
>>
>>What are you talking about there?
>
> Oh, right. To summarise what I wrote here on 27 Apr 2019 : Don't think
> reference to Object, think reference to Value instead. It's that
> simple.

I'm not getting you. Whether you call it a "reference to an Object"
or a "reference to a Value" (whatever the difference between those
things might be), it's still a reference.

> For the string problem, think of handing a primitive string to a
> function. No-one has been criticised for saying that a variable's
> value is a string, so the value is not reference_to_string. What
> happens when a string is handed to a function? If values can't be
> shared then the string has to be copied. Handing over a 1MB string to
> a function then becomes expensive, especially if the function just
> looks at the first character.

The reason that nobody would be criticised for saying it, despite
the fact that implementations can indeed pass shared references,
is that the primitive types are all immutable.

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


Thread

Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-16 14:34 +0000
  Re: Object values  (continued) Jon Ribbens <jon+usenet@unequivocal.eu> - 2020-03-16 14:52 +0000
    Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-16 18:19 +0000
      Re: Object values  (continued) Jon Ribbens <jon+usenet@unequivocal.eu> - 2020-03-16 20:06 +0000
        Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-17 19:01 +0000
          Re: Object values  (continued) Jon Ribbens <jon+usenet@unequivocal.eu> - 2020-03-17 19:55 +0000
            Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-18 17:29 +0000
  Re: Object values  (continued) JJ <jj4public@vfemail.net> - 2020-03-17 12:48 +0700
    Re: Object values  (continued) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-03-17 17:51 +0100
      Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-17 19:03 +0000
        Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-18 07:20 +1100
          Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-18 17:29 +0000
            Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-19 14:21 +1100
              Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-19 11:12 +0000
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-20 14:33 +1100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-20 09:21 +0000
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-21 09:56 +1100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-21 11:18 +0000
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-22 08:45 +1100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-22 10:10 +0000
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-23 07:44 +1100
    Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-17 19:09 +0000
      Re: Object values (continued) Richard Damon <Richard@Damon-Family.org> - 2020-03-17 16:21 -0400
        Re: Object values (continued) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-03-17 22:57 +0100
  Re: Object values  (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-19 05:32 -0700
    Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-19 15:26 +0100
      Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-19 18:16 +0000
    Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-19 18:15 +0000
      Re: Object values  (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-19 11:54 -0700
        Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-20 09:11 +0000
          Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-27 15:35 +0000
            Re: Object values  (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-27 09:59 -0700
              Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-28 14:09 +0000
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-29 14:18 +1100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-29 10:40 +0100
                Re: Object values (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-29 04:41 -0700
    Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-21 14:12 +0000
      Re: Object values  (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-21 19:45 +0100
        Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-22 10:30 +0000
          Re: Object values  (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-22 23:30 +0100
            Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-23 09:44 +0000
              Re: Object values  (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-23 11:19 +0100
                Re: Object values  (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-23 05:00 -0700
                Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-23 18:05 +0000
                Re: Object values  (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-23 11:50 -0700
                Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-23 19:34 +0000
                Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-23 18:14 +0000
                Re: Object values  (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-23 22:21 +0100
                Re: Object values  (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-24 14:09 +0000
                Re: Object values  (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-25 00:01 +0100
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-24 01:18 +0100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-24 14:24 +0000
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-24 15:43 +0100
                Re: Object values (continued) Julio Di Egidio <julio@diegidio.name> - 2020-03-24 11:03 -0700
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-24 18:23 +0000
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-24 22:19 +0100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-25 16:34 +0000
                Re: Object values (continued) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-03-25 23:17 +0100
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-26 01:27 +0100
                Re: Object values (continued) Andrew Poulos <ap_prog@hotmail.com> - 2020-03-26 18:58 +1100
                Re: Object values (continued) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-03-26 10:43 +0000
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-26 12:22 +0100
                Re: Object values (continued) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-03-26 10:08 -0700
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-26 18:29 +0100
                Re: Object values (continued) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-03-26 14:17 -0700
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-26 23:37 +0100
                Re: Object values (continued) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-03-26 16:40 -0700
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-27 11:38 +0100
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-26 18:11 +0000
                Re: Object values (continued) Silvio <silvio@internet.com> - 2020-03-26 19:41 +0100
                Re: Object values (continued) "Mark-" <nospam@mapson.xyz> - 2020-03-25 00:00 +0000
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-25 15:05 +0000
                Re: Object values (continued) "Mark-" <nospam@mapson.xyz> - 2020-03-25 20:12 +0000
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-26 18:09 +0000
                Re: Object values (continued) John G Harris <niam@jghnorth.org.uk.invalid> - 2020-03-25 19:39 +0000
            Re: Object values  (continued) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-03-23 18:49 -0700

csiph-web