Re: Object.prototype.toString.call(Uint8Array.prototype) throws a TypeError

2014-08-30 Thread Claude Pache
Le 30 août 2014 à 00:12, Andrea Giammarchi andrea.giammar...@gmail.com a écrit : Isn't String.prototype an ordinary object ? In ES1-5, `String.prototype` is a real String object, that wraps the empty string [1], and it is implemented as such in current browsers. But, this is intended to

Re: Object.prototype.toString.call(Uint8Array.prototype) throws a TypeError

2014-08-30 Thread Andrea Giammarchi
I see, thanks for clarification. If all native constructors will return `[object Object]` then it's OK for `Float32Array.prototype` and others to return the same but I'd rather avoid throwing with the most universally recognized as safe way to grab generic variables `[[Class]]` Regards On Sat,

Re: Status/Thoughts on Guards?

2014-08-30 Thread John Lenz
Not exactly the same but the Closure Compiler has a runtime type check mode that inject type checks. If you write jsdoc type annotations already this can be an low resistance path but its usefulness depends on the accuracy of those annotations. On Aug 21, 2014 6:54 AM, Curtis Steckel