Open dvv opened 12 years ago
delete is not the same as setting to nil. This is not lua. Candor allows having properties that point to nil. This makes JSON interop much easier for example.
As far as type coercion, I agree, == and != should be the same as JS === and !==.
will candor distinguish between delete foo[bar]
and delete(foo[bar])
and {delete: (foo) { bar } }
?
I believe so yes. If not, it should. I know I asked for this with "new" and I assume the logic is the same for all keywords.
hmm. i saw no new
in keywords. i thought we construct objects literally, no?
right, "new" was renamed to "clone". But it was "new" when I had @indutny make sure it could be used for other stuff.
Please, consider answering some naive ones:
==
,!=
. they are known as source of subtle bugs in JS, and every tutorial i read said i should use===
,!==
instead.delete foo[bar]
can be replaced withfoo[bar] = nil
, which frees rather useful keyword and can internally behave equally.+
, which is known to be another source of subtle bugs.TIA, --Vladimir