jdonaldson / promhx

A promise and functional reactive programming library for Haxe
MIT License
146 stars 24 forks source link

.notify() à la JQuery deferred? #8

Closed cambiata closed 10 years ago

cambiata commented 11 years ago

Hi Justin!

JQuery Deferred has a .notify() solution that seems handy when it comes to keeping track of loading progress etc. Any plans to implement something like this in promhx?

Jonas

jdonaldson commented 11 years ago

That's not a bad idea... my current plan is to review the current standards regarding promises: http://wiki.commonjs.org/wiki/Promises/A

And/or A+: http://promises-aplus.github.io/promises-spec/

Chances are that I have some mild breaking changes in store if I go with either of those. There's also an outstanding completion issue related to tink_macro. Those are my two puzzlers for now.

I'm keen on keeping promhx simple and extensible. But, bottom line is that I'll definitely enable something like this, if not implement it completely.

A couple of questions are:

Do notifications propagate? Can they accumulate? (latter promises having access to previous notifications?) Can promises consume/block notifications from propagation?

jdonaldson commented 10 years ago

Probably not going to follow this... There's a stream class that handles streaming notifications.