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

Re-assignment of method parameters #12

Open
bezirg opened this issue Mar 29, 2017 · 0 comments
Open

Re-assignment of method parameters #12

bezirg opened this issue Mar 29, 2017 · 0 comments

Comments

@bezirg
Copy link
Member

bezirg commented Mar 29, 2017

Example code:

module Test;
class C {
  Unit m(Int x) {
    x=x+1;
  }
}

Not a big problem, because in general it is considered bad practice; even in certain OO languages (OCaml,Scala) it is disallowed.

It could possibly be fixed by generating extra local variables on the method body, but it is redundant when it is not needed, and makes generation of distributed method calls easier.

@bezirg bezirg changed the title Mutation of method parameters Re-assignment of method parameters Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant