orthecreedence / blackbird

Common Lisp promise implementation (successor to cl-async-future)
83 stars 10 forks source link

Question about terminology #26

Closed mdbergmann closed 4 years ago

mdbergmann commented 4 years ago

Hi.

I'd like to use 'blackbird' instead of creating my own 'future' framework. But I'm having a few headaches with the terminologies used here.

I.e.: why is it called 'promise'? As I understand 'futures' and 'promises' is that a 'future' represents a future computation and a 'promise' will fulfill it, or set the value of the future. Which would mean that 'promise' in this library actually is a 'future' and the 'resolve-fn'/'reject-fn' actually represents the 'promise'.

Also things like 'attach' are quite surprising. I would think that a function name like 'on-complete' or 'on-fulfilled' would be easier to understand.

So my question here would be: what are the chances that some name changes could go into this library if I would create a PR?

orthecreedence commented 4 years ago

The library is loosely modeled after the bluebird js library. While I'm not really actively maintaining the library, I'm not really willing to introduce large breaking changes because of how it might affect others.

I think an option would be to fork it, or probably better is to wrap blackbird in your own lib that does whatever naming convention you find comfortable.

On Wed, Aug 19, 2020, 10:11 AM Manfred Bergmann notifications@github.com wrote:

Hi.

I'd like to use 'blackbird' b instead of creating my own 'future' framework. But I'm having a few headaches with the terminologies used here.

I.e.: why is it called 'promise'? As I understand 'futures' and 'promises' is that a 'future' represents the a future computation and a 'promise' will fullfil it, or set the value of the future. Which would mean that 'promise' in this library actually is a 'future' and the 'resolve-fn'/'reject-fn' actually represents the 'promise'.

Also things like 'attach' are quite surprising. I would think that a function name like 'on-complete' or 'on-fullfilled' would be easier to understand.

So my question here would be: what are the chances that some name changes could go into this library if I would create a PR?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/orthecreedence/blackbird/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABVXZVEAQVEYWZKJ4AZTX3SBQBUZANCNFSM4QFFHZWQ .

mdbergmann commented 4 years ago

I don't know the bluebird js library. Futures and Promises are in fact quite old. Most other frameworks I know (Scala, Rust and others) are modelled after the original concepts. Can be read here: https://en.wikipedia.org/wiki/Futures_and_promises

Anyway. Wrapping might indeed be an option.