3 ms·
As a mobile & fullstack developper, my road also takes me to different languages but for very different reason. To me swift is at its core the best language by
by bsaul 8y ago
As a mobile & fullstack developper, my road also takes me to different languages but for very different reason. To me swift is at its core the best language by far. I love the way it lets me model pretty much every problem using combination of enum and struct, while keeping everything value-based and type safe. If you add null safety, there is no other (mainstream) language that checks all those marks.
But the OP is right in that Swift aims at being a silver bullet, yet the pace at which it evolves compared to that goal is absolutely scary. Concurrency hasn't moved at all, and in the meantime server side performance is a total disaster (https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=fortune https://www.techempower.com/benchmarks/#section=data-r16&hw=...).
There is also nothing for cross-platform development (real cross-platform, not just iOS and macOS).
So, personally, my next experiment is going to be full stack dart.
- seandougall 8y agoThat benchmark seems to list only Kitura. I wonder what it would look like with Perfect, Vapor, or Zewo. > Concurrency hasn't moved at all Yeah, it hasn't moved because GCD is already pretty mature, and they don't seem to have made any effort at other concurrency paradigms. I'd love to see how something more like CSP would work (Zewo has an implementation, but I haven't had a chance to work with it yet). > There is also nothing for cross-platform development (real cross-platform, not just iOS and macOS). Not yet; it doesn't quite seem like it's ready to be a practical goal. I'm curious to see if that changes when they manage ABI stability.
- bsaul 8y agoGCD is a library, not a language construct. As such it is extremely raw, and i've got a strong suspicion that the fact that it wasn't built for server-side style concurrency is one of the reason kitura is dead slow in the benchmarks. Those kind benchmarks usually spawn thousands of simultaneous connexions, which is very far from what an app generally requires (but i could be wrong). It also doesn't provide more parallelism regarding i/o than os-based threading. go has light threads which makes context switching fast, and node has async i/o all over the place. Maybe Swift NIO would make a difference, but it would only make swift catch up to what the first version of node.js provided. My point was that this manifesto https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9f782 https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9... has been written 1 year ago and nothing has been implemented or announced at wwdc (but maybe i missed a talk...)
- jrs95 8y agoVapor generally kicks ass in benchmarks FWIW, and it's using this now so clearly Apple is beginning to pay attention to stuff around server side concurrency: https://github.com/apple/swift-nio https://github.com/apple/swift-nio Although as I mentioned in another comment, if you're looking for something more mature, Kotlin is a great option. Vert.x has the widest database support and is lean and fast, so this is probably what you're looking for. But if just Mongo/Cassandra/Redis is acceptable, Spring Boot w/ Reactive Web looks pretty cool, too.
- jrs95 8y agoI tried Dart out recently thinking it might make a bit of a comeback thanks to Flutter -- but I honestly just didn't enjoy it. I was doing a small POC project in AngularDart, and the experience I've had working with Angular w/ TypeScript was just much better. If you want something like a more viable server-side Swift, with a much better story around concurrency, you should check out Kotlin + Vert.x https://vertx.io https://vertx.io
- Apocryphon 8y agoWhat didn't you like about Dart? I've read that AngularDart is particularly little-used and unpopular. Maybe Flutter is where Google is placing their efforts now.
- pjmlp 8y agoIt is a minor issue, but I don't like they copied @Override annotation from Java instead of making it a proper keyword, it is not like they would be breaking backwards compatibility.
- jrs95 8y agoThe whole situation around packages was kind of a pain in the ass, so that was a pretty immediate turn off.