W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

RE: Outline of exactly how @@create works?

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Wed, 7 Aug 2013 20:22:56 +0000
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: Boris Zbarsky <bzbarsky@mit.edu>, Travis Leithead <travis.leithead@microsoft.com>, "es-discuss@mozilla.org" <es-discuss@mozilla.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F878A7D7C@BY2PRD0510MB354.namprd05.prod.outlook.com>
From: Allen Wirfs-Brock [allen@wirfs-brock.com]

> Which of these questions are still unanswered by the above doc?

Wow, it was a good document; I'm sad I forgot about it.

I think what's still missing would be some guidance, on when it's needed in designing platform classes or user classes, and why it was used for the new built-ins. (I think this ties in to your caution over in public-script-coord to not use that pattern much.) Also, what would the practical consequences of moving everything into @@create be, ignoring the constructor entirely?

One point I was confused on, that re-reading helped me understand, is that @@create actually creates the object instances; it does not manipulate passed-in instances. Thus, getting ahold of e.g. `Date[@@create]` or `HTMLElement[@@create]` would not allow you to do anything special; you could not e.g. turn a normal object into a `Date`. The most you could do is create an "uninitialized" object, and what that means exactly depends it seems on how much stuff you've shifted into @@create vs. the constructor.
Received on Wednesday, 7 August 2013 20:23:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC