Since Apple introduced Swift, they started to introduce things which were against Objective-C/SmallTalk philosophy.
Unlike Simula/C++ school, SmallTalk/Objective-C school valued simplicity and minimality.
Compared to Simula/C++, Objective-C folks/community has been very selective when they introduce new features to the language, while C++ community tended to add whatever people asked and whatever looked good. I like C++ in 1990’s. However, there are too many syntactic sugars and some functionalities which are not really necessary.
I know current generation of people. Instead of trying to understand philosophy behind their interested language, they just blame this and that about the language. To properly criticize in productive way, they should understand philosophy of the language. Only after that, in that boundary they should criticize the language.
So, people just blames how Objective-C is bad blah blah. Sure. it has its weak side. But once understand why it’s like that and what was its goal, it’s not that bad. Actually Objective-C with Cocoa is better than C++ with standard library or any framework.
Believe me. I am not narrow minded person. I’m a long time S/W engineer who learned many languages so far. Here in US, people just tend to stick to one thing and just see things from that point of view. It’s clearly seen when I got interviewed. They are only on one side.
Several years ago, ChangKi Kim and I have discussed a lot about those ( and complaint a lot about current generation of people how narrow mind they had. ) Also, now I have pretty sufficient experience about people in the US. So, I can now say this is this and that is that.
Anyway, people here is self-centric, while we are relation-centric. So, it is clearly shown in conversation. When others say something different than mine, then we considers the situation he is under. And if what he says is right under that situation, we nod. However, people here don’t behave like that. They don’t care what kind of situation others are. Because such attitude, they can’t proplery criticize other languages or even asks something weird.
I’m the person who asked generics in Objective-C to Apple a while ago. ( about 10 years ago?)
Although I know that many things which can be achieved using generics can be solved by boxing (i.e. NSValue, NSNumber, and so on ), but some can’t be still. So, having generics is good, but I understood why Apple and Objective-C society say no to such idea.
However, now air is not like that.
Even when I visited Apple personally, now I see totally different people. Probably that’s the reason.
They look to behave more like Simula/C++ people.
In OS X 10.11, they introduced some syntactic sugar. I like some of them, but some are not really doubt able.
Swiftification (New since WWDC Seed)
Framework APIs in both OS X 10.11 and iOS 9 have adopted new Objective-C features such as nullability, lightweight generics, and “kindof.” These features enable API intent to be expressed more precisely and APIs to come across better in Swift.
For instance we can now indicate that nil is a valid value for the destination view when converting an NSRect between coordinate systems:
– (NSRect)convertRect:(NSRect)rect toView:(nullable NSView *)view;
and that the array returned by splitting an NSString with componentsSeparatedByString: is an NSArray of NSStrings, and it will never be nil:
– (NSArray *)componentsSeparatedByString:(NSString *)separator;
I would like to talk about nullability.
In Objective-C, it’s perfectly OK to send messages to a null object. It has been like that and it has been considered as a virtue to have such null object-allowable behavior.
Null check on objects can be simplified thanks to that and that yields clear code.
However for the new nullability feature, they introduces nullable and nonnull keywords ( or _Nullable and _Nonnull ). It means that we need to care whether it can be null or not. It is good for people who have only C++ experience in their career. However, from the point of Objective-C view, it’s not. It’s like to make Objective-C more like C++.
Then it’s to get rid of one of the strength of Objective-C.
I know that it’s due to Swift. Swift. ( That’s why they call it ‘Swiftification’. )
Swift is kind of collection of what all people asked to a computer language. So, some part of it looks like Pascal, some looks like Python, some looks like C#, some looks like C++ and so on.
I like Bibimbop, but I don’t like to mix almost everything and to believe “because I provide all the things people asked, it must be the best.”
Well, we already saw something similar happened in this industry:
PL/1 and arguably Java
UPDATE : By reading this page, I can see that it’s prepared for Swift/Objective-C interaction. Hmmm.. Ok, then. it’s Ok.