Quoting constructs: Difference between revisions

Line 452:
^ nil "I am false, so I ignore the block"</lang>
Thus, the expression "someBoolean ifTrue:[ 'hello print' ]" will either evaluate the lambda or not, depending on the someBoolean receiver.
Obviously, you can teach other objects on how to respond to "value" messages and then use them as if they where blocks.
 
 
In addition, some Smalltalk dialects implement additional syntax extensions.
Anonymous user