Nil has a single instance named nil and is used to represent uninitialized data, bad values, or terminal values such as end-of-stream.
nil
. Comparing Nil and nil
will return false. In normal use you should not need to use this class directly: use nil
Answers true because this is nil. In class Object this message is defined to answer false.
Answer false. In class Object this message answers true.
return first non-nil argument. Since this IS nil then return anObject. In class Object, ? is defined to answer the receiver.
If the receiver is nil, evaluate the function and return the result. Since this IS nil, then evaluate the function and return the result. In class Object, ?? is defined to answer the receiver.
Returns false.
Returns nil.
Returns nil.
Returns false.
Returns an empty IdentitySet.
Returns nil.
Returns clock.nextTimeOnGrid.
Returns Quant.default.
Returns true.
See also matchItem.
Returns empty array.
Returns prevVal.
Returns the default ControlSpec
Either report error or inspect error and halt execution.
Executes function.
Returns stream.
All the messages for the Dependancy protocol (See class Object) are defined in class Nil to do nothing. This eliminates the need to check for nil when sending dependancy messages.
Many other messages are defined in class Nil to do nothing. This eliminates the need to check for nil.
There are a number of methods that can be applied to nil so that variables do not need to be initialized. Nil is just the "ground" (default case) from which the rest is bootstrapped.
Returns an array with the value. This makes it unnecessary to initialize when adding to a variable.
Returns an array with all the values. This makes it unnecessary to initialize when adding to a variable.
For nil, it just returns nil. This makes it unnecessary to initialize when removing from a variable and adding to it again.
Returns an array with all the values. This makes it unnecessary to initialize when adding to a variable.
Returns a function or a FunctionList. This method is used to add multiple functions to already existing ones.
This method is used to remove multiple functions from already existing ones. For Nil, it just returns itself.
This method is used to operate on events which are passed through the system as an argument.