3 ms·
I’m assuming by rust’s type system they mean without lifetimes. In which case it’s existed in lots of GC languages (OCaml, Haskell) but no mainstream ones. It i
by School-Cotton 3y ago
I’m assuming by rust’s type system they mean without lifetimes. In which case it’s existed in lots of GC languages (OCaml, Haskell) but no mainstream ones. It isn’t really related to needing a GC or not.
- gpderetta 3y agoYou still want RAII and unique references, but rely on GC for anything shared, as if you had a builtin refererence counted pointer. I do also believe this might be a sweet spot for a language, but the details might be hard to reconcile.
- School-Cotton 3y agoI haven’t used Swift so I might be totally wrong but doesn’t it work sort of like you describe? Though perhaps with ARC instead of true GC, if it followed in the footsteps of Objective-C.
- gpderetta 3y agoPossibly, yes. I haven't used swift either though. Does it have linear/affine types? Edit: I would also prefer shared nothing parallelism by default so the GC can stay purely single threaded.
- dartos 3y agoWithout lifetimes, Pins, Boxes, Clone, Copy, and Rc (Rc as part of the type itself, at least)