3 ms·
Property existence: key in object, typing `key?: T` Property no-value: undefined, typing `key: T | undefined`, a default for non-existent properties. Null: a
by wruza 3y ago
Property existence: key in object, typing `key?: T`
Property no-value: undefined, typing `key: T | undefined`, a default for non-existent properties.
Null: a synthetic unnamed symbol-object-nonobject artifact, arbitrarily used for statuses like n/a, not-yet, multiple-values, #err, not-set, unknown, no-result, no-value.
JSON: got it completely wrong.
- sgbeal 3y ago> Property existence: key in object, typing `key?: T` i have no idea what that's supposed to mean. Presumably you're using a TypeScript-ism? > JSON: got it completely wrong. Agree with it or not, it's what we have. Having implemented several JSON parsers and reformaters, i wholeheartedly with every one of JSON's design choices, including the lack of specification about integer sizes. Douglas Crockford did it exactly right, as far as i'm concerned.