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

Support for local imperative features #92

Open
5 of 9 tasks
romac opened this issue Mar 1, 2021 · 1 comment
Open
5 of 9 tasks

Support for local imperative features #92

romac opened this issue Mar 1, 2021 · 1 comment
Labels
extraction Feature or bug with the extraction phase feature Something needs to be added imperative Feature or bug related to imperative features

Comments

@romac
Copy link
Member

romac commented Mar 1, 2021

Add support for local mutation (ie. no mutable references, just mutable variables/parameters within a function).

  • Blocks - { a; b; c } (Block)
  • Declare variables - let mut x: i32 = 0; body (LetVar)
  • Assignments - vd = value (Assignment)
  • Field assignment - expr.field = value (FieldAssigment)
  • Return statement - return expr (Return) => tracked here Extract early returns in functions #71
  • Old - old(expr) (Old)
  • Snapshot - snapshot(expr) (Snapshot)

Start thinking about:

  • Mutable maps
  • Arrays
@romac romac added extraction Feature or bug with the extraction phase feature Something needs to be added imperative Feature or bug related to imperative features labels Mar 1, 2021
@yannbolliger
Copy link
Collaborator

yannbolliger commented Mar 2, 2021

The big question here, is what we want to do with references. For now, we allowed references because we knew that mutability was prohibited. As soon as mutability comes back, we need to revise, how we deal with references.

EDIT: question answered here in #98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extraction Feature or bug with the extraction phase feature Something needs to be added imperative Feature or bug related to imperative features
Projects
None yet
Development

No branches or pull requests

2 participants