Thread with 7 posts
jump to expanded posthttps://github.com/apple/swift/blob/main/docs/OwnershipManifesto.md has me like sickos.rs
just the other week, I was thinking it'd be great to have a language that's like a simplified Rust, with borrow checking in the easier cases, falling back to reference counting or GC for all the harder ones. it seems Swift might get there!
I think there's real potential for a new mainstream language that can achieve the same safety as Rust, and most of the performance, without having quite as much cognitive overhead. A successor to the GC languages.
finished reading this :3
yeah, this is Rust's &, &mut, std::mem::drop(), and !Copy, and C++'s std::move(), but for Swift, more or less. it's quite restricted compared to Rust considering, for example, the lack of explicit lifetimes. but this is very exciting!!
(gee sometimes I should proofread before posting…)
@leftpaddotpy @hikari it also means it’s incapable of expressing most of the patterns where you need named lifetimes in Rust though.
@leftpaddotpy @hikari like most Rust doesn’t have named lifetimes either, on functions they’re a rare special case
@leftpaddotpy @hikari yeah but this explicitly excludes returning references from functions and storing them in structs so this already covers strictly less ground than “rust without any lifetime annotations” does