Live data from Hacker News

Swift, and why it hurts you (from an GNUStep developer)

heronsperch.blogspot.com

1–10 of 60 posts

Re: Swift, and why it hurts you (from an GNUStep developer)

#3
"The language is very JavaScript-like in its design..."

Disagree. JavaScript isn't even strongly typed. Swift affords many imperative and functional techniques, but that doesn't make it JavaScript-like.

"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)."

By this logic we should all be using Java. Now ask yourself: Should we, really?

Re: Swift, and why it hurts you (from an GNUStep developer)

#6
I'm not sure why Swift is controversial. Objective-C was all but lock in to Apple's ecosystem. If you want cross platform there are other options. Why shouldn't Apple try to optimise development for their ecosystem? Playgrounds are pretty impressive, as is the interoperability with Objective C e.g. dynamic translation between Objective C and Swift. I wish Microsoft had made it easier to mix and match F# with C#.

Swift has some pretty nice features to improve programming safety such as stronger static typing, type inference (not as good as functional languages), a very nice syntax for option types, discriminated unions, pattern matching, improved focus on immutability. It's impressive that Swift introduces all these functional goodies without programmers having to blow a socket trying to convert completely to pure functional programming.

For example the Intermediate Swift presentation at WWDC 14 has a pretty elegant way to implement elements of what Scott Wlaschin calls 'railway oriented programming' (http://fsharpforfunandprofit.com/posts/recipe-part2/).

As much as I love functional programming I think they've done a pretty good job supporting Cocoa development and improving programming safety. My hope is that Swift will be a gateway drug for FP.

Re: Swift, and why it hurts you (from an GNUStep developer)

#7
I don't see how swift locks you in more that objective C ? I guess as its so much more accessible and easy to step into from javascript / java / C# it makes it more tempting to use compared to using something like Xamarin. I don't see this as a dark ploy just Apple wanting to make themselves as developer friendly as possible.

Re: Swift, and why it hurts you (from an GNUStep developer)

#10
If Apple really wanted to lock you in then it would not allow anything else than Swift/Objective C in the app store for macos and ios. I have seen lisp apps in app store, python apps, javascript apps, haskell apps, hell I have even seen the language I use and its quite unpopular , Pharo apps.

Its true that Apple imposes limitations for its own profit and the benefit of the users. But it does not lock in anyone.

So no Swift is no big conspiracy. Its just a move forward for Apple to attract more developers and give android java a run for its money in terms of performance and ease of use. Apple sends the statement "not only we are a platform with less worries on incompatible hardware, but now we even offer a powerful yet easy to use language". A wise move from Apple and a big plus for developers.

Post reply on HN