"Apple announced a new programming language and it doesn't seem to suck" was the message I received from a friend and colleague of mine Dan. He was of course referring to Swift that was released just a few days ago by Apple during their WWDC 14 conference.
I want a new language
Both Dan and I have a .NET background prior to our current work as Ruby developers and both share interest for programming and the languages used for that. As much as I am enjoying Ruby (and believe Dan is as well) I often find our conversation turns to yearning for yet another language.
That language looks something like this at least in my opinion:
- Clean syntax, ie. Ruby but C++ derived languages are OK. Just not Objective-C (NSEverything) or COBOL.
- Multi-paradigm: Object oriented, functional/procedural and reflective at least.
- Static inferred
- First class functions (<3 JS for this)
- OO interfaces (or duck typing, I'm still undecided)
- Cross platform
Reading about Swift then understandably made me really quite excited until the last point on my list which is the beginning of the end for me.
I really should've known this from the start...maybe I was fooled by some of Apples other announcements like the 3rd party keyboard support which is opening the walled garden a little.
Why is it important?
- What if my Hackintosh experiment at home comes to an end due to one too many kernel panics trying to update and I'll swap back to Linux?
- What if the OS X interface becomes indistinguishable from iOS interface and I don't want that on my desktop?
- What if someone writes an amazing VIM implementation that works beautifully in a browser and I can get a Chromebook?
- What about my Linux friends or Windows friends? They probably want to use what I write as well.
I could probably think of plenty of others purely for myself but it also excludes a huge part of the development community especially in places where paying Apple dollar for macs might not be within everyones reach.
General purpose language
Not being cross platform I think limits the ability for a language to be general purpose and I would like a general purpose language.
This I think is even more true when the platform is OS X.
Because Apple servers cost a lot of money to buy (besides this is supposed to be Cloud age now) and I don't see Nitrous.IO or Digital Ocean offering their awesome low cost services with OS X as a platform choice anytime soon.
Ok let's agree that this is for iOS and OS X development and it's not going to be my new go to general purpose language:
Hooray!! I don't have to write Objective-C anymore when my future app (any ideas?) needs an iOS version to increase the user base.
That would've been my opinion had it not been for 2 other recent announcements:
I can write Ruby (which I like) to create a native iOS app with native performance and it can also have shared ruby code with my Android version.
So I don't actually have to write Objective-C anyway to develop for iOS and as a bonus I get shared code between my 2 apps.
This kind of leaves Swift without a use...at least for me.
Let me know what you think via email [fxn at fxndev dot com] or on twitter @efexen