Objective-Smalltalk

I mentioned RubyMotion and Nu the other day, but missed Objective-Smalltalk.

I like the syntax in that it gets rid of a bunch of brackets, braces, and parentheses. Lines of code look more like sentences — they even end with a period.

But I wonder if, in practice, I could get used to it. Some extra punctuation may actually help readability.

Check out the Examples page. You see things like self window makeKeyAndVisible.

Is that easier to read than [self.window makeKeyAndVisible];? I’m not sure. It may be that, with practice, it’s at least as easy to read.

But: all that aside, what intrigues me most is that this is Smalltalk, and I’ve never written in Smalltalk, yet I’m aware that Objective-C is heavily influenced by it. It’s like Objective-C’s mom or dad.

Also: it has Higher Order Messaging.

self view subviews do setNeedsDisplay is way cooler than [self.view.subviews makeObjectsPerformSelector:​@selector(setNeedsDisplay)].

12 Mar 2014

Archive