On Swift's birthday, where do we go from here?
realm.io
realm.io
1. Get experts to improve the tutorials and classes.
-- This year I especially want to thank Ray Wenderlich (http://www.raywenderlich.com) for his clear tutorials and Rob Rix (https://github.com/robrix) for his focused classes.
2. Do spring cleaning on incompatibilities in Swift vs. Obj-C vs. Foundation, such as incompatible types that require casting, or bridging, or different semantics.
-- For most iOS code that I personally write, I value readable Swift syntax even more than fast toll-free bridging to Obj-C and CF. For examples, look at ints and strings.
3. Create some kind of dependency manager, to make it easier to have a Swift code that uses other Swift codebase.
-- The current approaches are Xcode project embedding, Carthage, and Cocoapods; this past year all of them have had struggles.
http://www.h4labs.com/dev/ios/swift.html
I expect to add a couple thousand in the second year. I'm sure the quality varies but a lot of great stuff has already been written.
Also, consider that there were 36,000 questions on StackOverflow for Swift. That's almost as many as Scala, for example.
I also hope Swift keeps improving but for the first year, I'd say it was much better than I expected.
Link?
It is an interesting language, but I've found a couple of things while starting to use it that have driven me crazy, and not really made me want to continue delving; the two that come to mind are
a) Error messages are awful, and often nothing to do with the actual error
b) Was driven crazy trying to append a tuple to a list. E.g.
A tuple of type (Int,String) is expressed (2, "a")
var aTuple : (Int,String) = (2,"Some")
A list of these is
var l : [(Int,String)] = []
This does not work:
l.append((2,"a")) // ERROR: missing argument for parameter #2 in call
This ALSO does not work:
l.append(aTuple)
but this does:
l.append(2,"a")Swift is useless to me if I have to re-write code on other platforms. In such cases I will always use as little as possible and then switch to some other portable language for the meat of my code.
The day Apple goes cross plat will be interesting. (Sorta like MS backing down on longstanding issues as reality invades.)
It takes a considerable amount of work to make a good web framework - look at the attention Rust gets and the state of its web frameworks. They've come a long way no doubt, but none are production ready. Swift can leverage some Objective-C sure, but nobody's writing web apps in Objective-C either.
Personally, I quite like Swift. I came into it from a primarily dynamic lang background, and found it very expressive - not at all the static lang shackles I was dreading.