Hacker News new | ask | show | jobs
by GeekyBear 502 days ago
> languages that are most strict like Rust but have more momentum and safety?

Like Rust, Swift is a compiled language that offers memory safety by default.

The creator of Clang and LLVM also created Swift, and interoperability with C was an explicit design goal.

So Swift offers the memory safety and data race safety of Rust, in a compiled language, without giving up tight integration with C.

(To be fair, better C integration is something the Rust community is looking to add.)

2 comments

fwiw Swift still doesn't support mixed-language targets so the interop is somewhat less useful to me than I'd like: https://forums.swift.org/t/se-0403-package-manager-mixed-lan...
The creator of Rust also briefly worked on Swift