Posts

Showing posts from July, 2016

Some Nice Features of the Objective-C Language

Here is a little list of things that, in my experience, contribute to make Objective-C a powerful and fun programming language. Classes are objects Each class is an instance of a meta-class automatically created and managed by the run-time. We can define class methods, pass classes as arguments, put them in collections and so on. To create an object, we just send a message to the class we want to instantiate. No need to reinvent a "factory" system. No need for a specific constructor mechanism at the language level. This helps keeping the language simple and powerful. And, by the way, meta-classes are objects too! Dynamic typing As in Ruby, Python, Smalltalk, Groovy… Extremely useful because we don’t always know beforehand what our objects are going to be at run-time. Dynamic typing in Objective-C is simple to use. For example, this declares a variable that can hold a reference to an object: id myObject; Optional static typing Still, Objective-C also has ...