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

Language idea: Allow mut on parameters #36

Closed
alexrp opened this issue Feb 21, 2023 · 1 comment
Closed

Language idea: Allow mut on parameters #36

alexrp opened this issue Feb 21, 2023 · 1 comment
Labels
area: language Issues related to the design of the language. type: feature Issues that are classified as feature requests.

Comments

@alexrp
Copy link
Sponsor Member

alexrp commented Feb 21, 2023

fn foo(mut bar) {
    bar = 42;
    bar;
}
assert foo("hi") == 42;

Basically just using a pattern-binding in parameter grammar rules instead of a bespoke binding rule.

@alexrp alexrp added state: deliberation Issues that require considerable deliberation and/or discussion before a resolution can be found. type: feature Issues that are classified as feature requests. area: language Issues related to the design of the language. labels Feb 21, 2023
@alexrp alexrp added this to the v1.0 milestone Feb 21, 2023
@alexrp alexrp self-assigned this Feb 21, 2023
@alexrp alexrp removed the state: deliberation Issues that require considerable deliberation and/or discussion before a resolution can be found. label Feb 25, 2023
@alexrp
Copy link
Sponsor Member Author

alexrp commented Feb 25, 2023

Closing since shadowing is almost certainly good enough here, and also makes it a bit more explicit what's going on.

@alexrp alexrp closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2023
@alexrp alexrp removed their assignment Jan 27, 2024
@alexrp alexrp removed this from the v1.0 milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: language Issues related to the design of the language. type: feature Issues that are classified as feature requests.
Development

No branches or pull requests

1 participant