Field update statement needs scarier notation

Bug #595782 reported by Matt Giuca
6
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

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r1095.

Changed in mars:
status: Triaged → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.