Field update statement needs scarier notation
Bug #595782 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Released
|
Medium
|
Matt Giuca |
Bug Description
The field update (fieldset) statement is impure (mutation, not just side-effects which are "okay" in Mars). Impure (mutation) constructs are now "forbidden" in Mars, where "forbidden" means "must have a scary syntax or require a special import". For the impure built-ins, we did both: you can either call them as __impure_array_set, or "import impure" and then use array_set.
The current notation for fieldset is "e.f = v". Change it to the scarier "e.f =! v" to imply that it is mutating e.
Another suggestion was to only allow it with a special pragma such as "enable_feature impure_fieldset", but this would be too difficult to deal with.
Related branches
Changed in mars: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in trunk r1095.