by xvilka · 2y ago · 0 comments
Swift offers a lot of ergonomic values over rust in ways that have made me switch over as my default choice.
Things like default argument values, lazy static initializers, computed properties, optional chaining. I’ve personally also come around to ref counting by default being a sensible choice for most programs.
Though the thing that won me over was the recent C++ interoperability. Rust doesn’t have a good story there yet that’s as comparable. Hours/days/months writing Rust bindings for a C++ library are often minutes in Swift.
Each language has its own place and own benefits, but to say there’s “no reason to use a language” feels short sighted and defensively dismissive
Foundation is being rewritten in Swift, Swift has moved out from under apples GitHub and is pushing more cross platform tooling for windows and Linux.
It’s not as flexible in terms of targets yet as Rust, but it’s also not just locked to Apple platforms.
And for a big chunk of developers, that trade off is fine.
There is still no way to make gui applications outside of Apple devices. Unless you want to make your own library or generate/maintain Swift bindings for an existing UI library.
Maybe, it will be okay for console only programs or servers but why use that over Java/JVM, nodejs or go?
Any api or data model code, pretty much 80% of my app code works crosss platform
The last time I used it (and I admit this was a couple years ago), silly expectations like “my program will behave the same on Linux as it does on Mac” were not being met.
Quite frankly if you can't track the lifetime of your own allocated memory, are you even a competent software developer?
I think it’s wonderful that Swift is trying to be more cross-platform. No need to shoot down the efforts of people trying to bring a language they like to more places.