Atom - bool type - lack of consistency ?
eliottparis opened this issue · 2 comments
eliottparis commented
For now :
Atom atom = true;
atom.isBool(); // => true, ok.
atom.isNumber(); // => true, (why not) (?)
long long_val = atom; // long_val == 1
atom = 1;
atom.isNumber(); // => true, ok
atom.isBool(); // => false, (why) (??)
bool bool_val = atom; // bool_val == true
|=> a bool is considered as a number but a number not as a bool
- is bool a number ?
More generally
Do we really need to support a BOOLEAN type in the Atom class ?
eliottparis commented
Should this test pass ?
Atom a1 = true;
Atom a2 = 1;
REQUIRE(a1 == a2); // ok
eliottparis commented
BOOLEAN Type has been removed of the Atom class.