[HN Gopher] Swift is a more convenient Rust
___________________________________________________________________
Swift is a more convenient Rust
Author : behnamoh
Score : 42 points
Date : 2026-01-31 22:05 UTC (55 minutes ago)
(HTM) web link (nmn.sh)
(TXT) w3m dump (nmn.sh)
| bigyabai wrote:
| Glad to see "Swift is good now" taking the place of "year of the
| Linux desktop" in a post-Steam Deck world.
| ewuhic wrote:
| >Swift is more convenient Rust
|
| Nah.
| Blackarea wrote:
| ... Literally ruined
|
| https://youtube.com/clip/UgkxFZA4XXnXzHyNso0OQ28XU60U1-jdR13...
| dagmx wrote:
| There's definitely areas where I agree Swift is more ergonomic.
|
| Parameter defaults, and null short circuiting are two of them.
|
| I find writing Swift is faster for me, and it's easier to learn
| for people than Rust. Also Swift interop with other languages is
| much simpler.
|
| Though there are way fewer resources to learn Swift, and cargo is
| superior to SPM. And of course rust is better cross platform
| today, but Swift is closing the gap.
|
| I think they feel like very similar languages overall, and they
| both influence each other.
| killingtime74 wrote:
| Even if it's the same (faster horse?) I would rather use Rust for
| the fact it's development is not tied to a big tech company which
| could abandon it if they liked. Yes it could continue on as a
| fork but it's development velocity would suffer.
| threatofrain wrote:
| If we're going to be concerned about any language languishing
| due to a lack of support... like, I don't think people are
| going to put "Apple dropping support" as anywhere near their
| shortlist. Rust has a higher risk of losing support.
| kibwen wrote:
| Apple was the primary and only major sponsor of Objective-C,
| used it as the core foundation of their entire platform, and
| dropped it like a stone with little warning or ceremony. Yes,
| being tied so closely to Apple is an existential risk for
| Swift. One need only look at the quality and trajectory of
| MacOS to see that Apple isn't a software company, let alone a
| company that cares about developer experience. As far as
| Apple is concerned, the primary benefit of Swift is that it
| produces a tiny bit extra lock-in for iOS apps, by making
| cross-platform development more difficult.
| nomel wrote:
| First sentence of the wiki page [1]:
|
| > Swift is a high-level general-purpose, multi-paradigm,
| compiled programming language created by Chris Lattner in 2010
| for Apple Inc. _and maintained by the open-source community_.
|
| As the article repeats, it is not Apple specific.
|
| [1] https://en.wikipedia.org/wiki/Swift_(programming_language)
| IshKebab wrote:
| Interesting. I'm not totally sold - still seems like Swift is
| quite niche and Apple-specific - but I might take another look.
|
| Also you might want to rework the `Box` example because you don't
| actually need to use `Box` in that case - the `Vec` already
| provides indirection.
| xannabelle wrote:
| I was surprised how similar their approach was to memory
| management. The creator is doing the same thing for Python as
| they did for Objective-C, making way for a new wave of Swift and
| Mojo, although we'll have to see if the latter grows to the same
| success.
| SkiFire13 wrote:
| > Consider an enum that represents a tree. Since, it is a
| recursive type, Rust will force you to use something like Box<>
| for referencing a type within itself. > > enum TreeNode<T> { >
| Leaf(T), > Branch(Vec<Box<TreeNode<T>>>), > } > > (You could also
| us Box<Vec<TreeNode<T>>> instead)
|
| This is wrong, you don't need a `Box` here. The Rust compiler
| forces you to have a layer of indirection, but `Vec` already does
| that.
___________________________________________________________________
(page generated 2026-01-31 23:00 UTC)