@gchiu asked for an operation that is similar to default, though kind of the reverse. Rather than rejecting an assignment based on whether the current value of a variable is blank/void, it would reject the assignment if the new value was blank or void...keeping the old value in these cases.
I'm not totally getting this, as it seems sort of like a WAIT statement, a SYNC, a FLUSH, a FETCH... I dunno. UPDATE seems a strange word to grab when there's this nice other function for it.
For what it's worth, UPDATE is not called anywhere in the R3-Alpha sources. If anyone feels it's somehow critical or crucial or can't be named-out-of-the-way / done-another-way speak up, as I want this operator too.
No. What if you wanted to update a variable from one port to another? Also, the interface is different. A left-quoting operation with a right-hand-side is actually arity 2, it just looks arity 1.
(Though interestingly, there is some smart ability to look at things and make decisions at runtime based on how an operator is to act... like how I said you could have 1 + 2 be 3, but (+ 1 2 3) be 6. The dynamic behavior can actually look around and act fairly differently, even when looking backwards...but sometimes quoting backwards and sometimes not is actually one of the things we don't have, because "the deed is done" by the time execution happens.)
If it turns out to be relevant to userspace we can name it "sync" or something, once we figure out what it actually is. But the whole PORT! thing is going to get rethought. So it's good if we have all our relevant protocols nice and up to date to look at as a group and solve together.
UPDATE 2018 (no pun intended): Today this construct is known as MAYBE, e.g. x: maybe switch [...] will only overwrite x if the switch succeeds and produces a non-NULL result.
Note that UPDATE* considers the right hand side being BLANK! to be an update, while plain UPDATE thinks that's not a value worth updating to. A similar separation exists for DEFAULT and DEFAULT*
Additionally, the * versions do not worry about whether you have an evaluative right hand side that's not a block.