News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by singularity2001 on Thursday May 19, 2022 @12:31PM (#31436786)
>>> I'm not convinced much could have been done about it.

Are you sure? What stops Swift with its beautiful syntax and safe optionals from becoming a systems language?

Re:Rust: A Critical Retrospective by Sirened on Friday May 20, 2022 @12:31AM (#31443366)
As someone who has actually tried writing a kernel in Swift, the issue is purely the runtime. While you can technically build a module without it needing to link to external Swift standard library binaries, the second you try and do anything with an array or optionals, you suddenly need to link in a 15MB behemoth that requires SIMD to even compile (at least on x64 and arm64). Porting this to bare metal is possible (and some have done it for a few microcontrollers) but its a pain in the ass.

I do love Swift and would use it for systems stuff in a heartbeat if I could, but there are also some downsides that make it pretty awkward for systems. The performance isn't always the best but it's (generally) very clear and ergonomic.

Re:Rust: A Critical Retrospective by tayistay on Thursday May 19, 2022 @04:53PM (#31440014)
Perhaps not that that much. Swift’s arrays are refcounted. And you can’t store an array on the stack. Classes are refcounted too, but you could avoid them. It also has a bit of a runtime, and you don’t know when it will take locks or allocate (though there is work to tag functions so they can’t do either).
Re:Rust: A Critical Retrospective by pjmlp on Friday May 20, 2022 @04:43AM (#31444847)
Nothing, that is even Apple's official wording for Swift.