Skip to content

No differentiation between equality (==) and identity (===). #18

@paulcuth

Description

@paulcuth

JavaScript has two distinct relational operators, == and ===, but colony is currently treating them as the same.

JavaScript:

console.log(0 == false, 0 === false);   // --> true, false

Colony output:

--...
console:log((((0))==((false))), (((0))==((false))));
--...

Maybe there should be runtime functions that perform these comparisons rather than using Lua's built-in operators that coerce in slightly different ways or have different behaviours altogether?

console:log(_equal(((0)),((false))), _identical(((0)),((false))));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions