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

Rename fromPromise to encaseP #92

Closed
Avaq opened this issue Apr 19, 2017 · 0 comments
Closed

Rename fromPromise to encaseP #92

Avaq opened this issue Apr 19, 2017 · 0 comments
Assignees
Milestone

Comments

@Avaq
Copy link
Member

Avaq commented Apr 19, 2017

This question illustrates confusion about the fromPromise function which I think was, in part, caused by the naming of the function.

From Promise suggests that the function takes in a Promise and returns a Future. In fact it encases a function which returns a Promise to return a Future instead, very similar to the encase family of functions.

To make the similarities between the two families of functions more apparent, I'm thinking to rename fromPromise to encaseP. This would also naturally provide a name for encaseP(f, undefined): tryP(f).

@Avaq Avaq added this to the 6.0.0 milestone Apr 19, 2017
@Avaq Avaq changed the title Possibly rename fromPromise to encaseP (or similar) Rename fromPromise to encaseP May 2, 2017
@Avaq Avaq self-assigned this May 6, 2017
@Avaq Avaq closed this as completed May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant