W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

[Bug 12458] Interface objects should be Functions

From: <bugzilla@jessica.w3.org>
Date: Wed, 13 Apr 2011 21:56:02 +0000
To: public-script-coord@w3.org
Message-Id: <E1QA82c-0003A4-AQ@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12458

--- Comment #8 from Travis Leithead [MSFT] <travil@microsoft.com> 2011-04-13 21:56:01 UTC ---
So, here's the interop story at the moment for Node:

IE9:      typeof Node // "object"
FF4:      typeof Node // "object"
Safari5:  typeof Node // "object"
O11:      typeof Node // "function"
Chrome10: typeof Node // "function"

(It's not as interoperable as I'd hoped.)

There's certainly an argument to be made consistency with ES5 (i.e., change to
"function"), and I get that.

However, interface objects really are not typical constructors--and I think
it's OK for them to be different in this regard. Case-in-point, interface
prototype objects are also not the same as any of the prototypes in native
JavaScript. For example, a "prototype" should be a prototypical instance of the
constructor (e.g., Number.prototype _is_ a number instance, Function.prototype
_is_ a function instance, etc., but clearly the interface prototype object does
not follow these rules either, nor should it IMHO.

Again, I think it's OK for interface objects to be different from a typeof
perspective.

I think the best path forward is to get Opera's bug fixed and Chrome should be
able to respond quickly given their release cadence. At that point the
high-order bit is interoperability.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 13 April 2011 21:56:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC