Wednesday, June 04, 2014

Swift



Swift is a new programming language developed by Apple as a replacement for Objective-C.   I've had some time to review the language by reading the iBook which Apple made available on it for free.   It seems to me that the language is very javascript  like in it's design and is a clear concession to those who don't like Objective-C's syntax.   The real purpose behind this language, however, is a little darker.  I believe that it's ultimate purpose is lock-in.   The more developers start using Swift the less they are going to be able to move to other platforms (such as Android).   

Please be cautious when using it and make sure that the only platform you wish to release on is iOS because that is very likely the decision you ARE making if you choose swift.

The language itself is a very nice language, the implications of it are what concern me.  Anything which impacts user/developer freedoms makes me concerned.

11 comments:

Unknown said...

What about Objective-C ? It's only purpose is to be used developing on Apple's platform.

Tmate said...

That is a valid concern, however - how is that different than the current situation with Objective-C? You're locked-in with it as well. You could say about choosing Objective-C exactly the same things you say about choosing Swift.

Fred Morcos said...

Objective-C as a language is available where GCC and Clang are available. That's not lock-in because the effort has already been put into locking-out its users. Swift is new and quite locked-in, until someone spends the time and effort to lock people out of it.

That's speaking of the languages only and not of Apple's CoreWhateverKit frameworks.

Charles Feduke said...

What? I'm not sure how CocoaTouch today isn't vendor lock in. Its not relevant that gcc can compile Objective-C because when you're developing for native iOS applications your code that relies on the underlying CocoaTouch framework isn't portable at all.

Swift is nothing like Javascript but it is more like Scala (specifically the parts of Scala that came from Haskell).

GregC said...

@Unknown I thank you a ll for you comments. The situation with Objective-C is somewhat different. On other platforms we have gcc and clang as well as GNUstep (which implements Cocoa) and other projects which also implement Cocoa to allow you to port your applications. There are also solutions based on GNUstep (Apportable) which can be used to port your apps to Android. So Objective-C doesn't represent any form of lock-in.

As long as Apple opens it's compiler as open source then there's not a problem. I don't see any issue with GNUstep supporting Swift it if does get released on this way. What I don't want to see is Swift NOT getting released. If it doesn't the community (meaning the open source/free software community) will need to build it's own.

GregC said...

@Charles Please see the reference to Apportable in my previous post. :) Their framework is free, if not open. It used to be based partially on GNUstep. Apportable allows porting to Android of iOS apps without the need to alter your source code.

Silber Deveau said...
This comment has been removed by the author.
Silber Deveau said...

@GregC , I completely agree with everything you said. In my mind, the reason for the SWIFT language has a darker motive, to make sure newer developers and web developers can easily create an app in order to keep engagement and activity up on Apple's App Store. And while doing it, to lock-in those newer developers so that they can only create Apple products and never port their code, to Android for example. So to me SWIFT lacks integrity as a language which makes it hard for me to get into it.

Nano said...

1) Apple's Swift is for OS/X as well as iOS

2) I'm pretty sure the RemObjects guys doing Silver - Swift for .Net, Android and Java have checked and are on good legal ground.

http://www.remobjects.com/elements/silver/

NalaGinrut said...

Well, why not make another FREE implementation of Swift? I believe the language spec is trivial for the portability, but the implementation.
If someone could make it on .net, that's possible to make it on GNU Guile platform for GNU stuffs.
For a FP like and a more dynamic language, implement it on GCC is not so cool.

Anyway, I don't think the language itself makes trouble, but the implementation.

Shayne O said...

With the most respect possible, GnuStep kind of doesn't look great as a target. I really don't mean to insult here because its a marvelous achievement, but it does need a bit of love from the hipster set to get it up to scratch visually. Of course if it WAS given a coat of paint, I'd be able to write ObjC for windows and linux without it having a strange resemblence to 1990s Motif. Now wouldn't *that* be something!

Swift looks pretty good, but I'm still not sure what it brings to the table, because at its heart ObjC is actually quite a nice and dynamic little language. Its second only to python in my list of programming loves (With Pascal a very distant third)