4 ms·
i really really really like swift. it's by far the best language i've ever used but i wish it weren't so "monoculture" (ios dev). i guess this is good for that
by mlevental 7y ago
i really really really like swift. it's by far the best language i've ever used but i wish it weren't so "monoculture" (ios dev). i guess this is good for that but i really wish the open source port of foundation were the focus of the community.
- NobodyNada 7y agoI feel like the open source port of Foundation is in pretty good shape (especially compared to a few years ago). The really important classes are mostly complete ([0]); all that's left is primarily some of the advanced networking features (but many real-world networking applications use swift-nio instead anyway). I think what's most important is 1) language refinements via swift-evolution, and 2) projects which bring Swift to more domains, such as this for the client-side and Vapor for the server-side. [0]: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md https://github.com/apple/swift-corelibs-foundation/blob/mast...
- ken 7y agoThe number of Linux issues on bugs.swift.org is still significant. Even when code compiles on Linux, it often doesn't work without crashing, or has different behavior. As someone who has tried to port (non-GUI) Swift code from Mac to Linux, I'd say there's still a ways to go.
- NobodyNada 7y agoIt's not always perfect, but it's certainly much more stable than it was a few years ago, and it continues to improve with each release. A few years ago I had to spend weeks with each new Swift release debugging segfaults and working around Foundation bugs and missing features, but lately my Mac-tested code usually works just fine on Linux (except for the occasional problem with C library dependencies or platform-specific APIs).
- deleted 7y ago[deleted]
- terhechte 7y agoI completely agree. I currently use Rust for all my cross platform use-cases. I'd love to have the same kind of library ecosystem ("crates") with Swift that I get with Rust. I hope we will get there slowly, with this and now that Windows almost works.
- mlevental 7y agoi use rust too and some of the quality of life features from swift would make rust as good as swift, if not better. ?? rather than unwrap_or, as? and try?, if let, guard let. maybe there are reasons rust didn't incorporate this sugar having to do with the borrow checker i don't know but jeez i feel so burdened with boiler plate when i deal with optionals in rust.
- sanxiyn 7y agoRust has if let. It can't chain them yet, but the proposal to fix it (RFC 2497) was accepted and implementation is in progress.
- terhechte 7y agoBut Rust lacks `guard let x = a else { return }` which is one of the nicest additions of Swift. I know there were attempts to add it to Rust, but somehow the community really doesn't like it because a `let x = match a { Some(a) => a, None => return; }` is too similar. However I feel that guard also expresses the intent.
- gamegoblin 7y agoI frequently define a `guard!` macro in Rust that does exactly that. Seems clean enough to solve at the macro level -- doesn't necessarily need to be built into the language itself.
- newacctjhro 7y agoThis kind of stuff should be on the stdlib if it's meant to be idiomatic.
- novok 7y agoCompile times and binary sizes are still issues although. There is a lot more optimization work left to do. It's a C++ v2 for a lot of the decisions they have made. And it doesn't scale that well when you have large code bases compared to other languages. Something like a javascript / flutter style hot reload really accelerates your dev cycle and I wish Swift had it too.
- kitsunesoba 7y agoI maintain a non-trivial Swift app and while compile times are indeed longer than those of Objective-C, it’s nothing insurmountable and has improved a lot on the past couple of years. To me it’s more than worth the trade with all I gain with Swift compared to Obj-C. Hot reload is nice but to me is far from a dealbreaker, especially after your app is past the phase where you’re writing a bunch of new UI.