I'm wondering if Swift will hit a sweeter spot than Go (GC, weird takes or delay on things like packaging, generics) and Rust (complexity) for userland systems software.
Outside of Google, using Go tends to be a decision made among a wider range of technical options whereas Swift is very often "not-ObjectiveC." To put it another way, Google created Go as an inhouse alternative for applications where Python, C++, or Java might have been the choice previously. A wide language range: even more considering the range of Java alternatives [Scala, Clojure] on the JVM.
A third factor I see with Go is the Clojure effect. The median Computer Science and Engineering knowledge in its community tends to be high relative to languages chosen based on platform limitations, institutional standards, or "this is the language I know".
I've left out Rust because I don't see it as likely to achieve the scale of adoption of Go or Swift...and saying that I should clarify that I think that platform binding, and a few billion platforms at that, will mean Swift is likely to instantiate more lines of code than Go. Clarifying further, I think Rust's adoption will be a matter of power law distribution not technical shortcomings.
The major enterprise players are not going to let Java (with Oracle stewardship) continue to be the language for the next generation of enterprise platforms and be at Oracle's mercy. Swift is open source and apple enterprise agnostic, easy to see other enterprise players pile on this language. IBM and SAP already on board. If you remember, this is how Java came to dominate enterprise space. Don't be surprised if Google release some sort of compatibility layer for Android.
[Case for bringing Swift on the Server by IBM]
https://www.infoq.com/presentations/swift-server
You are also overestimating Go's influence. It has been five years since the language release, it seems to have settled as a niche language like Clojure and topped out. Unless some major platform adopts it, it will remain a niche area. It certainly hasn't replaced (or even come close to) Python, C++, Java in any sense.
It's probably mostly personal preference, but I prefer Swift's approach to things over Go or Rust. Go in particular does a lot of things that I personally find obnoxious (capitalization of method names indicating exporting instead of using a proper keyword I find particularly egregious, but I also find the := assignment operator annoying as well.)
Swift is the first language I've learned in a while that had way more "OH yeah that's awesome!" than "What?! Why did they do that?"
Well, I think it could have been more cleanly designed if it was able to abandon the burden of Objective-C interoperability. (But Apple can't do this, obviously.) The standard libraries could have also been much cleaner if it didn't rely on NextStep. Also, I don't personally like the dichotomy of value types and reference types, but YMMV.
> it could have been more cleanly designed if it was able to abandon the burden of Objective-C interoperability
You mean this for the language itself and not the (standard) libraries; right?
> The standard libraries could have also been much cleaner if it didn't rely on NextStep.
I agree.
I think Swift will be a Go killer.
The idealistic side of me notes that Swift seems like a far more complex language than Go, so if Swift kills go, it will be bittersweet.
Microsoft also acknowledged that Swift support is the top request for their iOS bridge.
Check out Zewo[1]. They've been doing a lot of great work to make Swift 3.0 on the server work really well. Also, check out VeniceX[2] for concurrency and Open Swift[3] for cross project standards[3].
[1]: https://github.com/Zewo/Zewo/ [2]: https://github.com/VeniceX/Venice [3]: https://github.com/open-swift/docs
http://github.com/qutheory/vapor
Works on linux.
This is such a critical thing with todays interconnected apps that i have no idea how they did not worry about it from the start. Having had the pleasure of dealing with threads, mutexes, dispatchers, execution-contexts and the like there is no way i'd pick up a language that hasn't evolved in that regard, especially on a server. Even Javascript has this figured out with stage-3 async/await.
This is really awesome news. I'm pretty excited to see what they do in 3.0, I'd love to have another language under my belt without fooling around with NS-nonsense. That they might actually take Linux desktop seriously is really exciting to me also.
I'd love to see a widely-used tool where games and popular apps that would traditionally be put out on Win/Mac are able to be used seamlessly on Linux also. On top of that, I definitely don't want to write Java, I definitely don't want to write ObjC, etc.
Interestingly enough, I think this might even compete with Dart, which I suspect will end up getting Wasm support and ultimately replacing Java for android development... (Just a wild shot in the dark...) So I can't wait to see what the Swift starts brewing up in the Concurrency department.
How exciting!
WWDC is June 13-17, so they basically have to have something ready by then. Not so coincidentally, June 13 is "4-6 weeks later" from the May 12 date for making the release branch. Similarly, the late 2016 release for the final version of Swift 3.0 is probably actually mid September, since the version of Xcode with iOS 10 support has to ship before the next iPhone model.
Hurrah for marketing-driven release schedules.
The next focus should be on performance in my view. String processing in particular is too slow to be usable for server-side tasks.
Also, I wonder what to do with Foundation in the long run. It's huge but its design is extremely antiquated. At some point Apple will have to shed that past where URL manipulation and file system operations are methods on a string class.
I briefly ran the code sample you graciously provided me with a month ago through the profiler (https://gist.github.com/austinzheng/d6c674780a58cb63832c4df3...).
Long story short, it looks like the reflection machinery in the standard library is improperly being used to construct String instances. Doing so, while probably not sufficient to account for the entirety of the awful performance, is probably quite expensive. This looks like a bug and I'll try to dig deeper into it this week.
Swift also badly needs a native version of NSCharacterSet, even if only for programmer ergonomics.
The developer in charge of the standard library has mentioned that that team intends on redesigning the String API in the near future; this should provide an opportunity to reexamine the performance implications of the current implementations.
The first proposal for bringing Foundation APIs to this decade has already been accepted for Swift 3: https://github.com/apple/swift-evolution/blob/master/proposa...
Did i miss something ?
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mo...
It's not clear what the schedule would be but I suspect a number of the constraints changes will be in Swift 3.
The wildcard is probably the decision to go with reference counting over a tracing GC. We'll see how that works out. There are good arguments on either side.
Also if you're using Scala, there's a huge ecosystem of libraries and frameworks that just doesn't exist in Swift. If you want native compilation, just wait for http://www.scala-native.org/
Unless you are trying to build some really high performance shit, what really matters is developer productivity, which is abysmal for server-side Swift right now. Getting better every day though.
Source: built and deployed a service in Swift
Depends how you write the code :-)
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
This tells me that Swift is not ready for prime time 3 versions later:
"Swift 3.0 is a major release that is not source-compatible with Swift 2.2. It contains fundamental changes to the language and Swift Standard Library. A comprehensive list of implemented changes for Swift 3.0 can be found on the Swift evolution site."
Fundamental changes??? Let me know when is stable across versions.
for-in doesn't tell you the index of the current object so you'd have to manually keep track of the index.
Also, x++ is a common syntax in many languages and I think a new developer looking at Swift would try that first before using the other syntax (x += 1).
For instance, now I have this code
mutating func next() -> Element? {
//...
pos += 1
return data[pos-1]
}
or alternatively mutating func next() -> Element? {
//...
let e = data[pos]
pos += 1
return e
}
where previously I had mutating func next() -> Element? {
//...
return data[pos++]
}for (index, element) in list.enumerate() { print("Item \(index): \(element)") }
Functional decoration trivially provides that. Just zip a counter with the backing iterable, and modern languages generally provide that OOTB as a variant of `enumerate()` e.g.
for i, item in it.enumerate():
# stuff
> Also, x++ is a common syntax in many languagesMeh. It's generally present in B derivatives (via C) and that's pretty much it. Most languages do just fine without it.
Why not using JIRA?
Disappointed, only for Windows 10.
memo func hello(fname: String, lname: String) {
return fname.lname
}