Re: Are objects values?

2017-08-20 Thread Michael Dyck
On 17-08-19 01:34 PM, T.J. Crowder wrote: An ECMAScript *language type* corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language. The ECMAScript language types are Undefined, Null, Boolean, String, Symbol, Number, and Object. An *ECMAScript

Re: Re: Are objects values?

2017-08-20 Thread Bruno Jouhier
@T.J. Going back to your original post: According to the definitions that I gave, objects are not values (they are mutable) but they **have** a value. Their value is their identity which is a memory handle (a reference) in JavaScript. Objects are **more** than their value; they are identity +

Re: Re: Are objects values?

2017-08-19 Thread Bruno Jouhier
FWIW I wrote a dissertation on this very topic a few years ago: https://bjouhier.wordpress.com/2010/05/15/objects-values/ tldr; - Expressions have a sense and a denotation. - The sense of an expression accounts for its “cognitive significance” - The denotation of an expression

Re: Are objects values?

2017-08-19 Thread J Decker
note 1) 'pointer' and 'reference' are not synonymous. Although they should be, c++ and languages evolved from it have changed the definition such that they are not. Unfortunately; 'reference' when used by C++ people means a pointer to the value being passed; but hides the details that it is a

Re: Are objects values?

2017-08-19 Thread Isiah Meadows
Objects contain references to their fields, but they are always passed by value. This is probably the distinction you're looking for. On Sat, Aug 19, 2017, 16:32 Alex Kodat <alexko...@gmail.com> wrote: > While it does appear the that ECMAScript spec calls objects values, that >

Re: Are objects values?

2017-08-19 Thread kdex
I never claimed it was. I'm sure the notion of "value" that ECMAScript wants to convey is supposed to be something along the lines of "can be bound to an identifier". The semantics that are then defined over primitive/non-primitive values are a completely different matter. On Saturday, August

Re: Are objects values?

2017-08-19 Thread Sebastian Malton
@mozilla.orgSubject: Re: Are objects values? But references are also values. It's not a mutually exclusive thing On Sat, 19 Aug 2017, 11:32 p.m. kdex <k...@kdex.de> wrote:Yes, objects/functions are values, but they are not *primitive* values. The current draft uses the phrasing "object value&quo

Re: Are objects values?

2017-08-19 Thread Naveen Chawla
But references are also values. It's not a mutually exclusive thing On Sat, 19 Aug 2017, 11:32 p.m. kdex wrote: > Yes, objects/functions are values, but they are not *primitive* values. > > The current draft uses the phrasing "object value" several times. > > Section 4.3.3

Re: Are objects values?

2017-08-19 Thread kdex
Yes, objects/functions are values, but they are not *primitive* values. The current draft uses the phrasing "object value" several times. Section 4.3.3 explains that objects are "members of type Object", and a type is, by definition, a set of values. Therefore, objects must be values. On

Are objects values?

2017-08-19 Thread T.J. Crowder
I recently had an exchange which started out with my "correcting" someone who said "Functions are values" by saying "Function *references* are values. Functions are objects." He/she replied that objects are also values, and after much back and forth, cited [this part of the JavaScript spec][1]: >