2 ms·
> 3. Uses statically Typed Languages Objective-C is kind of an odd duck there. I think for all intents and purposes, Objective-C can be treated as a duck-typed
by randomdata 14y ago
> 3. Uses statically Typed Languages
Objective-C is kind of an odd duck there. I think for all intents and purposes, Objective-C can be treated as a duck-typed language and shares many of the same conventions as Ruby, given their shared Smalltalk heritage. Consider the following code:
NSString *string = [NSArray arrayWithObject:@1];
[string isKindOfClass:NSArray.class]; // Returns true
Which compiles and runs just as you would expect the equivalent Ruby code to:
string = [ 1 ]
string.kind_of?(Array) # Returns true
I would even argue that Cocoa (Touch) shares many similarities to Rails. Someone coming from a Ruby on Rails background should feel right at home on iOS, though perhaps less so on other platforms.