IBM Stops Server Side Swift Framework Development
forums.swift.org
forums.swift.org
I think these guys were best known for Kitura, the (previously) IBM-backed web app framework.
I don't do web apps in Swift "for realz" (I use TypeScript and tools like Angular and Koa.js for that kind of thing), but I do use Swift on Linux and have built some toy ones using both Kitura and Vapor.
My impression is that Vapor gained a lot more traction than Kitura did, so in some ways this might just be "the market choosing" and Kitura heading for the sunset.
https://github.com/vapor/vapor/ https://swift.org/server/
Amazon has also created a Swift web framework: https://github.com/amzn/smoke-framework
What are other promising future "end-to-end" (i.e. Web / Server / Mobile) development platforms are there? IMO these are the main contenders:
- JS / node.js / React Native (Android/iOS) (+ other transpile 2 JS langs, e.g. TypeScript, Clojure, Scala, OCaml, etc)
- Kotlin to JavaScript / JVM / Android / Kotlin Native (iOS)
- C# Blazor / ASP .NET Core / Xamarin (Android/iOS)
- Dart JS / Dart VM / Flutter (Android/iOS)
Rust/Go/C++ could get some mentions, but I don't think they have enough community or commercial backing to become a popular mainstream option.The frontend frameworks in Rust are surprisingly good, and I wouldn't be too surprised if this becomes a mainstream option at some point.
That said, I generally find there isn't all that much advantage to sharing a frontend and backend language.
I was an early adopter and saw promise in Dart based on the strength of its technical team (originally led by Lars Bak, Kasper Lund, Gilad Bracha, Bob Nystrom, etc) so invested a lot of time in developing a express-like web framework [2], Jade View Engine [3], Redis Client [4], JSON Client, etc. It had a nice/clean development experience, well-designed / fast libraries and APIs even back then, but abandoned it 6 years ago after going to work full-time on my own Startup and have been out of the loop of Dart VM/Server since then. Here's a short list of Dart web server frameworks I could find after a quick Google Search:
https://medium.com/@suragch/web-server-frameworks-for-dart-1...
Looks like Aqueduct [6] is the most popular at 1.4k stars, though I'd expect Dart Server is not going to see a major uptick until Google commits to a major project initiative like they're doing with Flutter & Angular Dart. So it might only see traction as a Dart gRPC server which can still provide an end-to-end development experience with SPA development with Angular Dart / gRPC Web / gRPC Dart and Flutter / gRPC Dart which I'll also add after having gone through a comparison of gRPC clients in different languages [6], Dart has basically the nicest async development experience [7].
[1] https://grpc.io/docs/quickstart/dart/
[2] https://github.com/dartist/express
[3] https://github.com/dartist/jaded
[4] https://github.com/dartist/redis_client
[5] https://github.com/stablekernel/aqueduct
[6] https://github.com/NetCoreApps/todo-world/tree/master/src/cl...
[7] https://github.com/NetCoreApps/todo-world/blob/master/src/cl...
That's one of the important points for me. Google's commitment to Dart is... well.. Google-ish.
The original intention as an alternative browser VM is done, most of the founding team left, and for years only the Google Ads team kept it alive.
The Flutter "happened" and Dart had its "Ruby on Rails" moment. Now it seems tied to Fuchsia, too. A popular Non-google project would seem good, otherwise the comparison to Swift seems more appropriate than Go.
With WASM being the new hot thing, I fully expect something Blazor-Ish to become quite popular in the Go world, and to be honest, once compiler output is going down, it's not that hard: the frontend stack is embarassingly shallow.
I actually liked what I saw of Dart and like Bob Nystrom's way of communicating (he responds, but isn't all out evangelizing like e.g. some people representing projects that start with "R"). So don't get me wrong, it's great to see some enthusiasm, and it actually brought me back to fiddle around with it a bit over the holidays. But I still believe that's more my "I liked my Palm Pre/WinPhone 10 better than Android/iOS" side than the one correctly reading trends...
(I'm a Perl developer ATM, I clearly don't know a thing about "resume-building")
Scala.js / Scala JVM / RoboVM
PWA is easy enough with Scala/Scala.js but I assumed that Android + iOS was a sufficiently painful process to warrant avoiding the attempt. Thought about mixing in Cordova or perhaps Ionic via the excellent ScalablyTyped typings library, but the path of least resistance is to just use TS on the frontend.
Coworker's article:
https://dzone.com/articles/why-i-dont-regret-moving-our-andr...
The parent post counted "Kotlin Native" as iOS. If you're willing to do that, you might consider "Scala Native" for iOS.
Also, integrating with other js components will likely be impossible as well ( try to integrate the google maps js component into your layout... good luck)
And browsers update way way more often than mobile os.
The UX you describe seems to fall in the 'naughty websites' category in my book, indeed. I think there's a "uncanny valley" of atrocious UX where it's "almost like the real thing but not quite" and it feels very disorienting. I'm pretty sure that wouldn't fly with most projects.
This and what you mention about js components imply that, what, we should expect each and every useful project out there to increase manhours to make some interface for flutter? I mean, short of a fits-all transpiling-middleware that takes in Js to output whatever Flutter needs to work with it, it's just not happening.
I'm not sure Flutter is as general a framework as we make it out to be; that it targets many platforms doesn't mean it targets many use-cases, let alone all of them. Afaik, it's a heavily 2D-graphics oriented solution, great for design-rich projects, and I had failed to see the restrictions (apps being their own little worlds) until you outlined what it means when translated for the web.
For the web I'd bet on some combination of wasm over this any day, tbh, combined with progressive web apps it seems a stronger, more general/opened proposition.
Thanks again for the good food for thought.
I mean, if you asked me today to spit out a backend + web frontend + native app, I'd actually have no qualms about committing to Rust as an option. It's nowhere near perfect, but not as far off as people think either.
I think Kenny Kerr's Rust/WinRT project is going to be great on Windows (and Kerr already proved he can accomplish this kind of project with C++/WinRT), but Rust's language model is so fundamentally different from iOS and Android's that I can't imagine it being feasible any time soon.
E.g.: https://github.com/Daddoon/BlazorMobile and some initial discussion https://github.com/aspnet/AspNetCore/issues/11471
If I was asked to do a full stack project with reason today I would write node bindings and use them.
IIRC, the vscode only needed the extension from the store...
I installed the Reason extension from Jared, I think, and started a new project.
My main problem was that I needed bs-platform installed globally AND locally in the repository. Otherwise the extension would display some errors that the bs-platform could not be found, which didn't help first, because I already installed it, haha.
The Objective-C interoperability doesn't fully support generics, so writing iOS apps entirely in Kotlin is inconvenient, but some companies are apparently (it was said at KotlinConf) already using it to share business logic on iOS.
I don’t think server side swift has any chance against the other contender, it just has nothing special to offer and it’s often not even on par with competing technologies (go simplicity and concurrency, java ecosystem, python dynamic nature, rust safety, etc.). It doesn’t even have async...
I would be surprised if anyone but iOS devs use it.
Ps: and don’t get me wrong,i absolutely love its syntax and type system. But it’s not immediately obvious to someone already familiar with another PL.
> Because of a lack of JIT capabilities There's the new Hermes engine which should speed things up
The main reason React Native will stick around is that it lets React developers more easily transition to native, and there's a ton of React developers.
The other day, I noticed a slow-running python data transformation job, mostly string comparisons. It was on pace to take 18h to finish. Within half an hour, I had a Crystal version, ported line-by-line, that took 3 minutes(!) to finish.
[0] https://twitter.com/jordwalke/status/1177373197517221888?s=2... [1] https://github.com/revery-ui/revery
Swift itself still needs time to mature, too. Things like the memory model, async/await, generics, etc. The future is bright, it will just require some patience to get there.
I don't think many people are going to start learning Swift just to build servers with it unless the platform/runtime provides something special. Otherwise it'll stay isolated just to the current iOS devs.
Or is this just not working on Web Framework ?
Just look at the kinds of discussions that e.g. Ian Partridge has contributed to: https://forums.swift.org/u/ianpartridge/summary
It includes substantial work on Docker images, logging, crash debugging, etc.
Maybe google will become a bit more invested in the Swift on Linux side of things, but so far I haven't really seen them invest in the ecosystem (besides pushing differentiable programming, which is cool, but it's mostly satisfying a niche requirement).
* Disclaimer: I’m the packager for swift on those platforms.
Perfect doesn’t look like it’s under active development, and if this means Kitura stops being maintained, it’s down to just Vapor as an active project.
I do find Golang has fill microservice space where Kitura couldn’t gain traction.
On the server, the lack of JIT warmup & a smaller overall heap size could be differentiators for Swift, depending on the context.
Whereas a language like Haskell is happy to try some absurdly abstract concepts in the interest of promoting computer science.
Swift's complexity feels much less compositional. There are still a lot of situations where I won't really know how certain features interact (especially when it comes to generics, associated types, etc.). Also, the documentation on some edge-cases is basically non-existant.
Swift and Rust are definitely similar in complexity, but Rust actually merits most of its complexity imo. It gives strong guarantees and a strong foundation for the future; I don’t believe that Swift has that. Swift adds a lot of features for the sake of having them, and I think that will catch up with the language quickly (see C++.)
As a random example, take the content of this article: https://www.rightpoint.com/rplabs/switch-method-dispatch-tab...
This is something that my less grumpy iOS developer colleagues regularly stumble over, and yet they keep telling me that Swift is super simple.
Also, Apple's tooling for Swift has gotten less crashy, but not more reliable in my experience. Almost every time I command-click a Swift function in Xcode to find its definition/source, Xcode shows me a random C function with the same name in some completely unrelated header file.
I predict/hope that Combine will be peak Swift, and that it will only accelerate the move to Electron and other portable technologies (go Flutter!).
https://news.ycombinator.com/item?id=17278175
I will say that I think the language made compromises in all three of these directions, though.
1. We've moved our company code base from tight C/C++ code to Swift. It is just as fast, with higher level syntax. In some cases faster. It has native SIMD types without external libraries too. Moreover, the Swift group has been focusing on correctness over performance to date. The goal has always been, that its deeply typed design can enable optimizations not even possible in c/c++.
2. Several of the founding Rust team moved to the Swift dev team years ago. As of Swift 5, the memory model supports the Rust-like borrowing. One could say Swift at this point is a complete superset of Rust. But, more importantly Swift favors a functional style of value type operations... which are inherently memory safe, and have no concurrency side effects in the first place. Value types together with Swift's very easy to use Dispatch concurrency library work for most use cases... it is viewed that "borrowing" is only a special purpose opt-in feature.
3. Swift is pragmatic. It is functional in its type system, value type operation, and no side-effect philosophy. But it is multi-paradigm, flexible, and designed for the real-world problems that reflect real programming needs... where as Haskell is arguably an academic curiosity and extremely unlikely to become a mainstream general purpose language.
It took a long time for the machine learning eco-system around Python to develop. I believe that’s the case with Swift as well.
- FluxML[1] for machine learning
- Zygote[2] for differentiable programming
- Turing[3] for probabilistic programming
- Rich support for GPU[4]
https://github.com/tensorflow/swift/blob/master/docs/WhySwif...
A quote from your own link. So they admit Julia might be a good fit. The only argument they gave is the "small community size", which is wrong, because Julia data science and any other computational science community is way bigger to almost non-existent Swift one.
> picked Swift over Julia because Swift has a much larger community, is syntactically closer to Python, and because we were more familiar with its internal implementation details
So Julia could match well, but the team at Google determined that Swift was a better fit for their new TensorFlow platform.
> and because we were more familiar with its internal implementation details - which allowed us to implement a prototype much faster.
In any case, both Julia and Swift seem to be making good progress here and I wish them both the best.
How is Swift's syntax in any way similar to Python? Other than not having semicolons, they clearly belong to different language families and don't seem particularly similar. Is there some very specific feature they were referring to here?
Some previous discussions that mention the swift-vs-Julia decision: [1] https://news.ycombinator.com/item?id=19714622 [2] https://news.ycombinator.com/item?id=19884273
Either way, Swift's functional design around a type system has some compiler implications towards solving larger problems that Julia probably will struggle with as it moves forward beyond the goal of just being a faster Python.
If you take a language like C++, the "atoms" of the code like a Float32, are just hard coded intrinsics in the compiler. As such, they have no ontological meaning in relationship to a Float16, an Int32, or an Array of Strings. In Swift, a float is built from a set of proofs as equatable, hashable, Numeric, FloatingPointNumber, and etc. As related to Julia or Python, a static language built around these proofs, enable compiler's to provide "co-pilot" development assistance, guarantees at runtime, code validation.
Why is this important? With deeper knowledge, a compiler can optimize things in ways that weren't previously possible, extract graphs, and automate code execution in heterogeneous computing evironments.
Guessing the opposite rarely happens.
Been hearing that for a decade now, but somehow I'm not out of work.