logoalt Hacker News

jdalsgaardyesterday at 11:46 PM2 repliesview on HN

I would tend to disagree; fundamental to Rust is the concept of zero-cost abstraction. Swift does not do that.

I my view, and I might be wrong, many features of Rust are chosen specifically to have the language comply to the zero-cost rule. Such as the ownership model.


Replies

isodevtoday at 12:17 AM

The explicit ownership model in Rust also protects one from the footguns of actors and Tasks in Swift. Rust also makes most mistakes in that area a build time error which is not only a huge time saver but also helps one learn and improve in these areas.

behnamohtoday at 12:38 AM

Swift also supports the ownership model.

show 1 reply