| Sign In/My Account | View Cart |
| Article: |
Objective-C: Dynamite! | |
| Subject: | Intelligent and well-informed | |
| Date: | 2003-05-01 19:02:33 | |
| From: | anonymous2 | |
|
Response to: Intelligent and well-informed
|
||
| I see your point and raise you. The befifits sound good, but the syntax is very strange to me, especially. [methodCall]. It is almost UML like. Why such a strange syntax?? | ||
Showing messages 1 through 4 of 4.
For example, the chunk of code below will ask object a to compare itself to b and return a True or False object repending on the result. The Boolean object will be sent the ifTrue: message with a block as the argument. The booleans that are instatiated from the 'True' class will execute the block, ones from 'False' will ignore it.
( a > b ) ifTrue:
[ Transcript show: 'a is bigger than b'. ]