W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: [whatwg] WebIDL and HTML5

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 27 Aug 2008 17:34:55 +1000
To: Web Applications Working Group WG <public-webapps@w3.org>
Message-ID: <20080827073454.GA2265@arc.mcc.id.au>

Garrett Smith:
> Granting programs access to native interfaces makes the program less
> stable. It also changes the meaning of the word interface to mean
> something that I don't know what it is. For example, an Interface
> cannot have a constructor, yet in WebIDL[4]:-
> | An ECMAScript implementation supporting these interfaces
> | would have a [[Construct]] property on the Circle interface
> | object which would return a new object that implements the
> | interface.
> - defines a type of interface that implements [[Construct]].
> Interfaces are used to describe objects. They should be flexible. They
> should not provide any implementation. An object can be defined to
> implement many interfaces and should not have any one of those
> interfaces be a "constructor".

The term I’ve used is “interface object”, not “interface”.  It’s an
object that provides access to functionality related to that IDL
interface.  You can think of an interface object with [[Construct]] as
being also a factory object for that interface, that happens to allow
the use of 'new' in ES to invoke the factory method.

Cameron McCormack ≝ http://mcc.id.au/
Received on Wednesday, 27 August 2008 07:35:41 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:11 UTC