Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help me put together a more formal spec for the DOM and ES #143

Closed
domenic opened this issue Aug 27, 2013 · 1 comment
Closed

Help me put together a more formal spec for the DOM and ES #143

domenic opened this issue Aug 27, 2013 · 1 comment

Comments

@domenic
Copy link
Member

domenic commented Aug 27, 2013

Hey all watching our spec!

The time has come to formalize Promises/A+ into an algorithmic series of steps suitable for incorporation into the DOM and eventually ECMAScript. This is largely done, and I am hosting the results at domenic/promises-unwrapping. I'd like to invite your feedback.

The spec is 100% Promises/A+ 1.1 compatible, as verified by the word-for-word implementation that passes our test suite. (And damn, am I glad we have a test suite! I caught several very tricky bugs with it.)

It is written in ES spec style, and like the ES spec but unlike our Promises/A+ spec, is very prescriptive.

It does adopt the approach we briefly discussed in #128, of assimilating as late as possible, although I still need to implement the memoization part of that.

There are still some open issues, and I'd love help from any of you on them. Keep in mind the direction of the spec is fairly well set and has consensus from all parties; this isn't the place to go crusading for sync resolution or similar. (If you really must do so, feel free to bug es-discuss; I'm sure nobody will mind yet another promise thread there...) But I imagine you all have useful ideas on how to solve the memoization situation or similar.

And of course, pull requests or issues for editorial things or ways to tighten the spec are definitely welcome. Implementers might be able to contribute especially here, matching their implementation against the spec's abstract concepts algorithms and seeing if there's a way to simplify them. (I know I came up with at least a few tricky steps by looking at the source of @briancavalier's avow.js, in particular it's assimilate-jit branch. Hmm, I should probably include an Acknowledgements section.)

Finally, if there's interest from the majority of this group, I'd be quite happy to bring this spec under the official Promises/A+ banner, i.e. under our GitHub organization and everything. I still think our existing spec (i.e. this repository) should be the primary output of Promises/A+, for reason I've expanded on previously. But I think it would be a cool endorsement for us to give, and show very directly how our group has managed to influence the course of the language. Maybe promises-aplus/formal-spec or promises-aplus/dom-spec or similar.

@briancavalier
Copy link
Member

Sounds great, @domenic. I haven't been able to spend as much time on Promises/A+ lately as I should, but I'll do my best to help.

Just glancing over the algorithmic spec, I noticed: should UpdateFromReason be named UpdateDerivedFromReason to parallel UpdateDerivedFromValue?

I'll try to give it a more thorough read by early next week.

@domenic domenic closed this as completed Feb 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants