logoalt Hacker News

airstrikeyesterday at 9:30 PM3 repliesview on HN

As much as I enjoyed Swift, one can only wonder what the world would look like if they had gone with Rust as their default language instead.


Replies

afavouryesterday at 11:14 PM

One of the genius things about Swift is its interop with Objective C. Made the switch over considerably easier for developers. I’m not sure what that looks like in a Rust world.

Rust is also just a more complex language. I’m not convinced the benefits would have been worth it.

AceJohnny2yesterday at 10:49 PM

Rust doesn't have an ABI [1]. Swift needed one to be a useable application language:

https://faultlore.com/blah/swift-abi/ (written by a core Rust developer)

[1] apart from the basic/universal C one, which prevents exposing any useful Rust semantics over the interface

jadengelleryesterday at 9:43 PM

Modern Swift borrows a lot from Rust! And it also has its own benefits, both ergonomic and also supporting eg generic in dynamic libraries

show 3 replies