Closed slightlyoff closed 11 years ago
Do we want to end up with both? "DOM" is an ugly prefix imo.
@annevk: I think the thought here is that the DOM version would end up subclassing the pure ES one once it exists, adding the EventTarget
bits. Not sure what we need to do to make that play nicely...thoughts?
Maybe EventFuture then?
I'm still a bit unclear as to how JavaScript is going to utilize this. Are there any APIs that will be part of JavaScript that need this?
Lots of JS APIs need this, and it's common enough in libraries that they're all providing it. As a result, JS will likely get a subset of this. So yes, JS needs it. I'm fine with EventFuture...others ideas?
(Since we have DOMException and DOMError, maybe it's not too bad after all, even though slightly ugly and somewhat weird.)
The word "Future" doesn't really give you much clue about what it does. It sounds cool, but...
API names take on meaning both through use and through naming (usually in the reverse of that order).
Sure, but "future" is not really indicative of function or role. Like "a DOMError is an error that ...", while a "a DOMFuture is a future in which ... dinosaurs still roam the earth". If a future is really just a promise in disguise, then call it DOMPromise?
Not going back to "Promise". We ended up at "Future" because "Promise" is far too loaded a word. Sorry.
Ok, but everyone is just going to say "Oh! a future is just a promise..." or "futures are the promises of the Web" and the such. And, "what's this futures thing? ... oh, a promise! why didn't they just call it that?!"
It might be worth pointing out somewhere in the docs that future is actually the more established term for this kind of thing. Beyond JavaScript circles, I even suspect that more programmers know “future” than “promise”.
@rauschma, might be helpful - though why we care what programmers outside the JS community call these things is not clear to me. But anyway, enough bikeshedding. @slightlyoff, if you are not going to change it, then please close the bug.
Well, the question I'm asking is "Future" or "DOMFuture", not "Future" or "Promise". We don't seem to have resolution on that question yet.
Ah, sorry. I got the sense that was resolved. FWIW, I like DOMFuture for the same reasons @annevk gave.
OK, I'm sold. Will rename. Thanks all.
The current design squats on the name
Future
, potentially precluding others from defining it sanely in ES5 contexts. This is potentially problematic as one goal of this proposal is to allow ES7 to specify a subset of the behavior we outline in a JS-standardFuture
type. Should we moveFuture
toDOMFuture
?