Little Boxes
I was speaking to Mr Daniels today and waxing lyrical, as is my wont, about the lovely messaging system in objective C. He commented that something I said was a really nice metaphor so I thought I’d post it here.
Objective C, as you might know, uses square braces (these []) as part of its syntax for sending messages. For example:
[myObject init];
Well, it occurred to me that those square brackets make the object and the message look like they’re in a wee box – so when you ask an object for an answer, the question just kinda falls out of the box. Like this:
theAnswer = [myObject whatsYourFavouriteColor];
That’s all it was – but he’s right enough – it helps to make things easy. You drop the question into the box beside the object and the answer falls out the other end 🙂
July 30, 2008 at 5:21 pm
Paul Daniels?
That’s magic… not a lot of people know that.. whoops, Debbie, where’s me hair piece?
July 30, 2008 at 8:10 pm
No, you silly man! >John< Daniels. The scary terrorist-looking person!
July 31, 2008 at 8:13 am
I know not of this man ye speak of but i do know a Jack Daniels