roanutil_@programming.devtoProgramming@programming.dev•White House: Future Software Should Be Memory Safe
7·
9 months agoTo be fair, Swift uses reference counting instead of garbage collection which has different tradeoffs than GC but does incur a performance penalty.
I can’t compare compile times to C++ or Rust but I would expect it to be in the same ballpark of Rust. However, the way I develop is with all external dependencies binary cached so I only have to build my code.
As far as the language itself is concerned, I love it. It really is like a, “Diet Rust Lite”. By which I mean, it’s powerful but a lot less pedantic by doing some things for you that Rust puts on the developer. If you’re deploying in an environment that can tolerate less fine control over memory use and instructions, Swift is the better option IMO.
If you’d like to read the observations of a team that can really evaluate Swift and compare it to other options: https://forums.swift.org/t/our-journey-with-swift-thus-far-some-notes-and-reflections/70510
Id be happy to discuss finer points if anybody wants.
Edit: Swift for C++ devs series by a swift core team member — https://www.douggregor.net/posts/swift-for-cxx-practitioners-value-types