On Wed, Feb 5, 2014 at 10:34 AM, Andreas Rossberg <rossb...@google.com>wrote:
> On 5 February 2014 18:35, Domenic Denicola <dome...@domenicdenicola.com> > wrote: > > The evolution of DOM and ES promises, and the related fragile > consensuses, has been an involved process. > > > > Going back to the source documents, consider what the May AP2 > proto-consensus really is: "Abashed Monadic Promises 2," from [Mark's > presentation][1], page 18. Using modern terminology, this consisted of > "resolve," "then," "accept," and "flatMap" (monads+promises, for short). > The outcome of that meeting was that the DOM would proceed with > standardizing the subset of AP2 that it needs, namely "resolve" and "then" > (promises, for short). > > Just to be clear, that is not my recollection at all. > > I'm still puzzled where this interpretation of the consensus came in. > I was present in both respective meetings and don't remember this ever > being said. Nor does anybody else I asked so far. It's not in the > notes either. OTOH, I know that several participants have been under > the assumption that the consensus was to include all of AP2 in ES6. > That includes Mark, btw. > > Sorry to dwell on this, but this misunderstanding is what I find > particularly irritating. > I don't want to dwell on this either. Different people do indeed have different memories of both of the crucial meetings. And AFAIK, the notes do not adequately resolve the memory disputes. But just for the record, my memory regarding the memory-conflict issues are: At the end of May mtg, the consensus compromise was actually AP3. This rapidly fell apart due to discussion of its consequences on es-discuss, where AP2 was (correctly IMO) seen as strictly superior to AP3. At the end of Sept mtg, my memory of the state on entry to the meeting agrees completely with Domenic's. On exit, my memory is a) We had agreed to promote both the .then level and the .chain level to ES6. (This is probably the biggest disagreement among the memory of the attendees.) b) At the .then level, we agreed essentially to promises-unwrapping as it was at the time, which did one-level unwrapping of the output side of .then by use of internal properties. (Or what Domenic now characterizes as "by magic".) c) Domenic and Allen had talked about subclassing, and Domenic came up with a nice subclassing proposal that kept this "by magic" unwrapping. After the September mtg Yehuda did not attend the end-of-Sept mtg, and afterwards rejected the "by magic" unwrapping as hostile to subclassing goals I have yet to understand. Domenic responded by changing the output unwrapping of .then to use .then, which, as Kevin correctly points out, broke the AP2 consensus. However, at my urging, Domenic initiated a private thread with the main .chain level advocates, including IIRC Andreas, Sam, and Tab, to see if any objected to the switch to .then doing unwrapping by use of .then. I was privately shocked that none did. At this point, perhaps I did the community a disservice by staying silent, and not pointing out more forcefully to the .chain advocates why they should object to this switch. But since * they were not objecting, * the switch only harmed properties that they care about and none that I care about, * we knew of no way to restore the AP2 consensus and also achieve Yehuda's subclassing goals I did stay silent until this problem was independently noticed by Kevin and brought to my attention and (at my urging) Domenic's attention as well. Kevin's suggested a good way to meet all goals simultaneously. If we were still trying to do AP2, I think it would be worth considering: * On the output side of .then, still use some kind of nominalish type test to recognize whether the callback has returned a promise. * If it has, rather than use so-called "magic" to unwrap it one level, use that Promise's .chain. By calling the returned promise's .chain rather than .then, we preserve the one-level unwrapping of AP2. By calling its .chain rather than accessing its internal properties, we preserve the subclassing flexibility Yehuda wants. If we were still going to do the standards committee "do both" failure mode, Kevin's suggestion is the best way I've seen to reconcile all the conflicting demands. At Thursday of the end-of-January meeting, everyone there including the .chain advocates agreed to avoid the do-both compromise, and just adopt the .then level. This was an excellent decision, and one much better than I thought could be achieved. THE BIGGER ISSUE Unfortunately, just as Yehuda was not there in September and did not agree to the consensus then, Andreas was not there on Thursday of January and (above in this thread) does not agree to that consensus. This indicates a different failure mode we should be concerned about. Not everyone is at every meeting. If anyone absent from any meeting can veto the hard-won consensus achieved by those who did attend, it is hard to see how to make progress. OTOH, without this dynamic, we might proceed despite strongly held objections, which really is not consensus. Only our insistence on true consensus has saved us from prior disasters like ES4. I really don't know what to do about this. > /Andreas > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss