Marriage of C with Smalltalk Dynamic language, runs natively not on/in a virtual machine. Simply put, it’s a superset of C, with OO and dynamic features. Steve Jobs at Next adopted it, later Mac OSX was based on it.
the features and libraries available to C. Basic building blocks: Classes, defined by interfaces Value types (Structs, primitives, etc.) Pointers are needed when referring to objects. Function pointers are achieved through Blocks pointers...
to an object, and at runtime the system will try to find a method (or property) with that matching name and params to then execute. A good analogy is to think of a class as a dictionary, with a key-value system.
as Ruby. if you want to override a base method, simply name it the same, have the same return type and params. No need to mark things virtual, or use the new keyword, override, etc. Inheritance is everywhere in Objective-C/Cocoa, where as in C# interfaces and Composition are encouraged.
method + indicates a “class” method, static in the C# lingo. All methods and properties in the interface section are visible to the caller or subclass. @private at the top of the implementation section can list methods you want to be private.
calls them Categories, they work in the same way extending in Ruby works (almost). ( catName ) tells compiler it’s a category will add DoFoo to any instance of Base
the protocol (the 2 can be mixed), then it’s required by default. if the method was marked @optional, then the adopter/conformer doesn’t have to implement the method But caller of the class needs to check if the method is implemented use reflection to test conformity and implementation of an optional method
with the pre-defined rules on when to retain, release and/or set to nil. Doing this incorrectly could cause memory leaks. iOS 5 brought ARC, or Automatic Reference Counting. Simply put, the compiler adds the appropriate release, retains where they’re needed.
but it’s cool enough to be on the list *”KVO provides a mechanism that allows objects to be notified of changes to specific properties of other objects.” - Apple documentation
of the dynamic nature, much like Ruby. Obj-C discourages method chaining, because it becomes more unreadable unlike other languages. Less hand holding than what VS and the C# compiler offers. Like Rails, CocoaTouch has MVC baked in, it’s the preferred way to build applications. Because iOS apps generally aren’t enterprise, you won’t see complex DDD layers and architectures.
that ships is called OCUnit. Much like NUnit, JUnit, etc. There’s also plenty of BDD, Specification testing options as well. Apple documentation is great, much better than MSDN.