Live data from Hacker News

Swift is a more convenient Rust

blog.namangoel.com

1–10 of 318 posts

Re: Swift is a more convenient Rust

#2
> Swift is better for writing UI and servers and some parts of compilers and operating systems.

Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now.

If the Foundation framework and SwiftUI paid serious attention to non-Apple platforms, then Swift itself might have a chance. Until then, even C# is going to look more attractive for cross-platform devs that don't want to drown their software in ifdefs.

Re: Swift is a more convenient Rust

#3
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

Can't you use Qt with Swift's bidirectional C++ interoperability?

Re: Swift is a more convenient Rust

#4
post #3
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

Can't you use Qt with Swift's bidirectional C++ interoperability?

You can. But you can also use Avalonia*, Uno Platform* , Gir.Core or whatever currently maintained Qt binding library is for .NET. The FP and syntax advantages listed in the article exist in equal measure in C#, and so do zero-cost Rust-style abstractions.

Swift is a language with a lot of potential, but it has a lot of work ahead of it, the work that was done for .NET's performance, cross-platform support, tooling ecosystem and OSS-focused development process.

*both of which have SwiftUI style extensions for declarative UI definition and MVU patterns. Avalonia even has the F# version of that.

Re: Swift is a more convenient Rust

#5
post #3
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

Can't you use Qt with Swift's bidirectional C++ interoperability?

I mean, you can use all of POSIX with C FFI if you wanted. But that goes for most languages, and it's a far cry from the convenience of a well-made standard library. People want Apple to stop pretending like it's impossible to support other OSes, it's really that simple. If they want their language to have serious popularity, they have to act like a real Open Source maintainer and not a business.

Swift's adoption outside of Apple developers forced into using it is more or less sabotaged by Apple's decisions. Whether they realize it or not, this behavior is undermining Swift's credibility and likely pushing people onto C++/Rust where they can use LLVM without limitations.

Re: Swift is a more convenient Rust

#6
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

> If the Foundation framework and SwiftUI paid serious attention to non-Apple platforms

They started late, but isn’t https://github.com/apple/swift-foundation paying serious attention to non-Apple platforms now?

SwiftUI, I think, isn’t as essential, as it isn’t really possible to create a good cross-platform Ui library (and yes, that means I think running iOS apps on MacOS can’t provide an optimal experience)

Re: Swift is a more convenient Rust

#7
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

[deleted]

Re: Swift is a more convenient Rust

#8
post #6
post #2

> Swift is better for writing UI and servers and some parts of compilers and operating systems. Swift is better for some UI and some servers/operating systems. A considerable problem with Swift's adoption is that zero attention has been given to ergonomics on other platforms which has left it as the Xserve of programming languages for quite a while now. If the Foundation framework and SwiftUI paid serious attention t…

> If the Foundation framework and SwiftUI paid serious attention to non-Apple platforms They started late, but isn’t https://github.com/apple/swift-foundation paying serious attention to non-Apple platforms now? SwiftUI, I think, isn’t as essential, as it isn’t really possible to create a good cross-platform Ui library (and yes, that means I think running iOS apps on MacOS can’t provide an optimal experience)

I'm just calling it like it is. I'm a Rust dev that really doesn't look at Swift with much hope. It's not a language that performs consistently across platforms, which is documented well in the repo's Issues tab. I just don't have the time or patience to work with a language that treats me as a platform adversary. If Apple doesn't go the extra mile to make their language attractive outside their ecosystem, they're just not going to compete in the greater programming community. Rejecting it on principle is a no-brainer for any cross-platform project. The case for Swift is shallow, even if you're a Mac-native dev.

The worst part is, Swift is a perfectly fine language on paper. It's got Lattner behind it, it's got literal trillion-dollar corporation funding behind it, and interfaces with LLVM to boot. It's lovely! My problem with Swift has always been Apple's attitude towards their own language and how desperate they are to reject non-ecosystem users. My life is too short to put up with nonworking language primitives in 2024. It pains me to say it, since Swift is so cool, but there are several better languages.

Re: Swift is a more convenient Rust

#10
> Rust invented the concept of ownership as a solution memory management issues without resorting to something slower like Garbage Collection or Reference Counting.

They did it well, but not invented?

There very many kinds of influeces: https://www.reddit.com/r/rust/comments/le7m54/is_it_fair_to_...

Especially Cyclone, I think: https://en.m.wikipedia.org/wiki/Cyclone_(programming_languag...

Post reply on HN