You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thinkSystem>>#global:put: should probably return the value that is now stored in the globals.
This would be consistent with Array>>#at:put: returning the new value.
It seems like a sensible guideline for all core library mutators of this kind to return the value, so that if it was computed from an expression, it can be used further immediately. Other options such as self or nil seem to be less useful. Returning the old value might be another option, but seems to be inconsistent with the general philosophy, and unexpected from the naming.
I think
System>>#global:put:
should probably return the value that is now stored in the globals.This would be consistent with
Array>>#at:put:
returning the new value.It seems like a sensible guideline for all core library mutators of this kind to return the value, so that if it was computed from an expression, it can be used further immediately. Other options such as
self
ornil
seem to be less useful. Returning the old value might be another option, but seems to be inconsistent with the general philosophy, and unexpected from the naming.System>>#globals:put:
returningnil
was identified here softdevteam/yksom#90 (comment) by @ummarikar.Todo for Spec
System>>#globals:put:
returning the value, and testing a range of valuesThe text was updated successfully, but these errors were encountered: