You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
As in any interlanguage mapping, no mapping is perfect but some are more useful than others.
NOTE: It may already be too late to make this change, even if we agree it would have been a good idea.
Wasm null is used for the uninitialized value on of values of nullable types. For nullable types, null will be the unique platform supported value to indicate that the expected value is absent. This corresponds most closely to the JS undefined rather than the JS null. For the ES specification itself, undefined is consistently treated as the indicator of absence:
varx;// x === undefinedlety;// y === undefinedfunctionfoo(x){console.log(x);}foo();// unbound parameters bound to undefinedfoo();// non-return returns undefined({}).z;// absent properties read as undefinedfunctionbar(x=3){returnx;}bar();// 3. unbound parameters use default valuebar(undefined);// 3. parameters bound to undefined act as if unboundbar(null);// null. null does not emulate unbound(newMap()).get("x");// undefined indicates absence