NONE-transparent functions
A none-transparent function is one that exhibits this behavior:
>> none? function none
== true
An example is:
remove find block value
The result of find can be none, but remove does not care. None is a valid argument to remove.
Another example is:
clear find block value
This behavior is productive in many cases, but not everywhere. There are times when you want to trap the error case as soon as possible.
For example:
find find block value value2
Here it is better if find is not none-transparent.
In addition to remove and clear, the new take function is also none-transparent. But are there other functions that really should be?
If you have a strong argument in favor (or against) let me know by posting a comment.
6 Comments
|