Allen Wirfs-Brock (2013-08-07T20:02:26.000Z)
domenic at domenicdenicola.com (2013-08-12T05:10:01.885Z)
On Aug 7, 2013, at 12:52 PM, Domenic Denicola wrote: > Allen, would you have time to write up exactly how @@create works for all of us? I think I understand it, based on piecing together a lot of threads since its inception, but since it will be a very important part of designing solid primitives for the web platform, a more complete outline would be helpful. For example, here are the questions that come to mind for me. I am sure the answers to them overlap substantially. You should probably start with http://wiki.ecmascript.org/lib/exe/fetch.php?id=meetings%3Ameeting_jan_29_2013&cache=cache&media=meetings:subclassing_builtins.pdf In particular the first half of that deck. > - What is the difference between @@create and the constructor? Which responsibilities belong to each? > - How exactly does @@create play a role in subclassing and enabling better subclass support? > - What role does @@create play in creating well-behaved classes, generally? > - When is @@create necessary at all? When writing our own classes, or designing classes for the platform, when can we leave it out? > - How will classes that use @@create differ from those that don't? > - What problem exactly does it solve that ES5's non-stratified construction falls down for? > - To what extent is it used in the ES6 built-ins, and for what purpose? Has it been "retrofitted" onto any older built-ins? If so, how does that change their behavior from how they were specced in ES5? If not, what differences does this cause between the older built-ins and newer built-ins? > - Is there any mechanism in the spec, current or planned, for extracting a class's @@create value? If I got ahold of one, what could I do with it? E.g. `Map[@@create](somethingThatsNotAMap)`. > Which of these questions are still unanswered by the above doc?