typeof symbol (Was: Sept 19 TC39 Meeting Notes)
bruant.d at gmail.com
Mon Oct 1 13:23:17 PDT 2012
Le 01/10/2012 21:42, Brendan Eich a écrit :
> Andreas Rossberg wrote:
>> On 30 September 2012 00:08, Brendan Eich<brendan at mozilla.org> wrote:
>>> I think this is too philosophical a discussion to result in a strong
>>> to risk "symbol". Just my gut-check. Other TC39ers should weigh in
>>> R. especially).
>> Type "symbol" would be my preference, but it is difficult to estimate
>> (for me) whether that involves a risk.
>> However, this clearly is an issue beyond symbols alone. The same
>> problem re-arises whenever we have to add new primitive types in the
>> future. It doesn't seem like a sustainable strategy to fake any new
>> type ever into an object. Perhaps it is less harmful on the long run
>> if we took the chance to clarify _now_ that the set of strings
>> returned by 'typeof' is not fixed, and should not be treated as such?
> I could go for that (see my "int64" and "uint64" argument).
> And as noted, IE has softened up the developers, or so I hear.
> Someone who knows more should weigh in. I even heard that in IE
> return "unknown"! True?
Try "typeof document.createElement('div').offsetParent" on IE6-8. I
can't verify because I'm not Ubuntu right now, but if I recall it will
give you "unknown".
If it works, credit where it's due, John-David Dalton shared this to me
a while ago. If it doesn't work, sorry for the noise.
If I had to guess, I'd say it's been fixed in IE9, but I'm interested if
someone can test.
More information about the es-discuss