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

Improve external mutability #2273

Closed
SupunS opened this issue Jan 25, 2023 · 2 comments
Closed

Improve external mutability #2273

SupunS opened this issue Jan 25, 2023 · 2 comments
Assignees
Labels
Improvement Language Breaking Change Breaks Cadence contracts deployed on Mainnet

Comments

@SupunS
Copy link
Member

SupunS commented Jan 25, 2023

Issue to be solved

A previous version of cadence (secure cadence release) restricted the potential foot-gun of mutating container-typed
let fields/variables via the
Cadence mutability restrictions FLIP.

However, there are still ways to mutate such fields by:

  • Directly mutating a nested composite typed field.
  • Mutating a field by calling a mutating function on the field.
  • Mutating the field via a reference.

Suggested Solution

Explore potential improvements that can be done at the language level to eliminate/minimize the above-mentioned foot guns.

@SupunS SupunS added Language Breaking Change Breaks Cadence contracts deployed on Mainnet Improvement labels Jan 25, 2023
@SupunS SupunS self-assigned this Jan 25, 2023
@j1010001
Copy link
Member

our recommendation updated onflow/flips#59 - bring up in LDM, decide if we need breakout of if it is ok to close.

@SupunS
Copy link
Member Author

SupunS commented Jun 23, 2023

We have three FLIps (onflow/flips#89, onflow/flips#86, onflow/flips#94) proposed for this, and three separate issues (#2534, #2535, #2536) tracking the implementation.

Therefore closing this issue.

@SupunS SupunS closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Language Breaking Change Breaks Cadence contracts deployed on Mainnet
Projects
None yet
Development

No branches or pull requests

2 participants