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

call c.f() and become A() #232

Open
pirapira opened this issue Nov 9, 2017 · 1 comment
Open

call c.f() and become A() #232

pirapira opened this issue Nov 9, 2017 · 1 comment

Comments

@pirapira
Copy link
Owner

pirapira commented Nov 9, 2017

There is one case where reentrancy is fine, which is just before return.

Instead of doing

let x = c.f() reentrance {A ()};
return x and become A();

we could just say

call c.f() and become A();

This kind of sentences need to specify three things:

  1. what to call
  2. which state to use in the continuation and
  3. what to return (the return value should not depend on the balance or the storage, which might have changed during the call).

Perhaps, we should just limit the use case to, just return what was returned from c.f().

@fordacious
Copy link

Could implement this as syntactic sugar (syntax transformation) as this is a special case. Assuming this is not too confusing to developers.

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

2 participants