What's the method for determining whether we run the multimethod dispatch
algorithm versus the ES6 abstract equality algorithm?
One or both operands value objects.
Gotcha. One more, I think.
int64(0) === 0L
I assume that int64 is not defined as a composition of primitives or value
On Jan 16, 2014, at 7:38 AM, Kevin Smith zenpars...@gmail.com wrote:
What's the method for determining whether we run the multimethod dispatch
algorithm versus the ES6 abstract equality algorithm?
One or both operands value objects.
Gotcha. One more, I think.
int64(0) === 0L
[oops - reply all this time]
Value objects have value, not reference, semantics. JS has string number
boolean already (note lowercase names). With value objects, users and the
host env can define others.
Makes sense, but I thought the user could not define semantics for ===:
it just means
Kevin Smith mailto:zenpars...@gmail.com
January 16, 2014 8:26 AM
[oops - reply all this time]
Value objects have value, not reference, semantics. JS has string
number boolean already (note lowercase names). With value objects,
users and the host env can define others.
Makes sense,
Kevin Smith wrote:
It's opaque. If you self-hosted using a Uint32Array of length
two (e.g.), you'd have to declare that as the per-instance
state for the value class. I didn't show syntax for that --
working on it still.
And if you for some reason used
Brendan Eich wrote:
It would be better to repair == by allowing developers to opt string
and boolean (note lowercase) into B
And number too.
Will try to get all this drafted, just not today.
/be
___
es-discuss mailing list
es-discuss@mozilla.org
js 0L == 0
typein:2:0 TypeError: no operator function found for ==
And what does this do?
0L == { valueOf() { return 0 } }
Is the Object-type operand converted to a primitive before the overload is
matched?
___
es-discuss mailing list
I would expect that to be `true` same as `0 == {valueOf:Number}` would be
On Wed, Jan 15, 2014 at 5:10 AM, Kevin Smith zenpars...@gmail.com wrote:
js 0L == 0
typein:2:0 TypeError: no operator function found for ==
And what does this do?
0L == { valueOf() { return 0 } }
Is the
js 0L == { valueOf: function() { return 0 } }
typein:2:0 TypeError: no operator function found for ==
Is the Object-type operand converted to a primitive before the overload
is matched?
No, the multimethod dispatch algorithm runs. Even with ToObject (I see I
left that out), there is
Kevin Smith wrote:
js 0L == { valueOf: function() { return 0 } }
typein:2:0 TypeError: no operator function found for ==
Is the Object-type operand converted to a primitive before the
overload is matched?
No, the multimethod dispatch algorithm runs. Even with
10 matches
Mail list logo