Closed WebReflection closed 6 years ago
to strength the reasoning about boolean VS bool
typeof 1 === 'number'
typeof '' === 'string'
typeof {} === 'object'
typeof Symbol() === 'symbol'
why would typeof false === 'bool'
instead of its long time well known boolean type ?
Thanks for keeping this proposal consistent with the language.
Updated the README file to change bool to boolean. Also updated the SIMD types proposed to use boolean for consistency. I'll keep this open until I transfer it to the spec file.
to strength the reasoning about boolean VS bool
typeof 1 === 'number' typeof '' === 'string' typeof {} === 'object' typeof Symbol() === 'symbol'
why would
typeof false === 'bool'
instead of its long time well known boolean type ?Thanks for keeping this proposal consistent with the language.
What do you think about int8
type? should it be changed to integer8
too?
IMO, bool
is a well known keyword to represent boolean type.
BTW, JavaScript has a Java in its name! and boolean
belongs to Java world.
The int and uint conventions are taken from Typed Arrays: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
Javascript already has a lot of conventions. Trying not to change any of them as it could turn into a bikeshed issue and I'm trying to minimize those as much as possible.
please do not make same early mistake TypeScript did in its origins, in JavaScript, the primitive type for a boolean is booelan, not bool.
Thanks for considering this change.