This week I'm trying to learn objective C. It's quite a nice language, with reference counted garbage collection (albeit manual reference counting), and fairly loose typing (compared to C++ or Java that is).
The syntax is rather strange though. I think that's the most offputting thing about the language. To call a method on an object, it looks something like:
But then if there's a parameter to go into the method, it has a colon in it:
It's also got some named parameters stuff, so you can have:
[foo insertObject:bar atIndex:5]
Note that the first parameter is
bar, but it's almost not a named parameter. This is interesting because I use this kind of call style in Perl a lot, where I'd do:
Which seems to be pretty much the same thing, except Objective-C has it built into the language, and comes with parameter checking.
Anyway, I'll post more as I code up more interesting things.