2014-09-21

Swiftly, Swift

And so, Apple is pushing Swift 
an innovative new programming language for Cocoa and Cocoa Touch

If you are fond of computer languages and you haunted a bit chrestomathy sites like “old” good RosettaCode, Swift won't look so much «innovative», and it must be branded as «new» just in the sense that it is chronologically recent. It may be labelled as modern, since it has the features you expect from a modern dynamic programming language, but it is «innovative» just inside the limited world of the Apple programming environment, where Objective-C was pervasive (and still will be until Swift doesn't gain enough “market” — it won't be too late, because of Apple's efforts).

I think that my “tolerance” towards Objective-C comes from the fact I was already accustomed to Smalltalk, but here and there I have always read unhappy comments about its syntax, that seemed cumbersome to many programmers (especially the newcomers wanting to put hands on the cool Apple stuffs, maybe to make money with the definitive iPhone app, or whatever). In the direct comparison with C++, I have always judged Objective-C a better, cleaner, approach to object oriented programming.

I might be wrong (if it makes sense: it would imply that it exists an objective way of evaluating my judgement, and I claim it doesn't exist), but that's trifling.

My actual “concern” is the future of Objective-C in the long run, since we have to admit that Apple was giving it great momentum, advocating its usage and contributing heavily to define the standard (adding new features too). A different “concern” is the desertion of the contribution to gcc, regarding its support to Objective-C; the seeds of the shift from gcc to Clang and LLVM were already thrown…

As Swift will replace Objective-C (for mobile and desktop programming), the language could starve and the quality of its support (by compilers) could drop, because of lack of general interest — I need to stress the “could”: many almost-unkown languages, under-used and under-represented in the mass programming languages panorama, vaunt a first-class quality development; but it is also true that the logic driving their development is rather different, while Objective-C, unfortunately for it, has known the intoxication of the “market” and could “suffer” for its deflation consequent to the Apple's look-away.

Tiobe index ranks Objective-C as the third place (Swift is at 18th, but quickly going up);  after the Swift-putsch, will Objective-C mold as a niche-language, disappearing even from the first 20 popular languages of Tiobe? Will exceptional project like GNUstep or the game Oolite, altogether with the interest in the GNU community, be enough to keep Objective-C development (bug fixing, better current standard support, efficiency… new ideas?) at a reasonable pace? Will they suffer because of Apple choices?

About GNUstep, better if you check the opinions by the Chief Maintainer. If Swift will be open-source (that doesn't mean it will be with a “good” license), GNUstep could embrace it as well. The text darts another question almost killing my previous speculations: will Swift be just a high-level programming language, while Objective-C will anyway continue to be used as “low-level” programming language — the language that makes the “foundation” work?

We expect that there are tons of Apple code in Objective-C, and they will be not replaced swiftly, but what about the future? What will be rewritten and what won't be? Anyway, a fact will continue to be very likely: Objective-C mass popularity will drop and its third place will be stolen by Swift — at least, this seems to be the purpose of Apple and the consequence of the success of the “innovative” Swift language.


No comments:

Post a comment