@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 liked his idea of calling this UPDATE:
>> x: 10 >> x: update () >> print x 10 >> x: update [1 + 1] >> print x 2 >> x: update 20 >> print x 20 >> x: update [if 1 > 2 ] >> print x 20
I like it–I’d certainly use it. But one problem is that there’s an existing UPDATE port action, which was defined in Rebol2:
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.