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
@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 +
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
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
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
>
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
@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
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
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
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]:
>
10 matches
Mail list logo