-
Notifications
You must be signed in to change notification settings - Fork 26
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
The treatment of Future #25
Comments
Good question. @EliasC is the right person to answer this, but So calling
like so
has return type Fut int. The expressions
has type int. Thus, if you write a method
this will not compile, because
However
will compile. I hope this helps a little waiting for @EliasC. |
Thank you Tobias for the clear explanation. I remember vaguely that the presentation said something along the lines of what you just wrote. The treatment of futures fits the Encore philosophy, which requires that things are asynchronous by default. I also remember that at the meeting it was said that there could be implicit insertions of get whenever necessary. Alternatively, you could decide to implicitly drop the requirement to “get”, whenever the method call is not assigned to a variable, i.e. there is no way to get hold of that future in the future ;-). My point is, that the current examples on the github do not agree with the current compiler. |
@sophiaIC We changed the test cases to match the use of futures, but no one remembered to change the files in At some point we should come up with a way to collapse nested futures. Right now the type of
|
|
Monadic join is the appropriate function to collapse futures (after such a thing comes into existence). On 06 Aug 2014, at 16:00, EliasC [email protected] wrote:
[email protected] Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm |
I'm all for monadic joins but maybe the use of nested futures will be so rare that we can make some collapsing implicit (and force the programmer to be explicit about wanting a value of type |
Can we close this? |
I think we can close this. |
You obviously have recently changed the treatment of futures. Namely, several programs do not compile currently, unless you add a Fut to their return type - as I did to the example in program StringSend. I am not clear what the correct behaviour is.
The text was updated successfully, but these errors were encountered: