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

RFC: more-promise-methods #1691

Closed
Theodus opened this issue Mar 15, 2017 · 6 comments
Closed

RFC: more-promise-methods #1691

Theodus opened this issue Mar 15, 2017 · 6 comments
Assignees

Comments

@Theodus
Copy link
Contributor

Theodus commented Mar 15, 2017

Additional methods for the Promise actor:
https://github.com/ponylang/rfcs/blob/master/text/0035-more-promise-methods.md

@Theodus
Copy link
Contributor Author

Theodus commented Mar 15, 2017

This is blocked due to issues with tuple types. See #1146, #1393, #1496

@jeremyjh
Copy link

I'm very new to Pony and probably don't have this signature right but does it make sense to also have a bind or flat_map method for promises?

fun tag flat_map[B: Any #share = A](f: {(val->A): Promise[B]}[A, B] box): Promise[B]

Or, is there a way I can turn a Promise[Promise[A]] into Promise[A] ?

@Theodus
Copy link
Contributor Author

Theodus commented Mar 18, 2017

@jeremyjh I expect that more methods such as flat_map will be added through future RFCs. Currently, the next method acts as "bind".

If you would be interested in starting a discussion about additional methods for the Promise API, then you may write up the RFC with the one linked above as reference. More information about the RFC process can be found here: https://github.com/ponylang/rfcs/blob/master/README.md

@SeanTAllen
Copy link
Member

@Theodus once the currently ongoing tuple work gets merged, will this be unblocked?

@Theodus
Copy link
Contributor Author

Theodus commented Jun 7, 2017

@SeanTAllen It should be.

@Theodus
Copy link
Contributor Author

Theodus commented Jun 23, 2017

This has been unblocked by #1937

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

3 participants