3 ms·
Exactly correct, I think. Cyclone allowed borrowing of "regions" (which were similar to rust lifetimes) in a very similar way. This was either based on or itsel
by mkehrt 2y ago
Exactly correct, I think. Cyclone allowed borrowing of "regions" (which were similar to rust lifetimes) in a very similar way. This was either based on or itself inspired other theoretical models of borrowing at around the same time; I'm not sure on the causality but I read all the literature at the time!
- caspper69 2y agoIn my research a few weeks back, I went down the rabbit hole of region based memory management, and Cyclone was one of the first languages I came across (the majority of academic papers on the topic retrofitted an existing language- usually C). I might be wrong here, so please feel free to correct me if so, but I don't think borrowing was a concept, per se, of the language itself. As you mention, the concept the Rust designers took from Cyclone was explicit lifetimes. Borrow checking provides two features (but in my opinion in a very un-ergonomic way): (1) prevention of use after free; and (2) temporal memory safety (i.e. guaranteeing no data races, but not eliminating race conditions in general). I'm still wobbly on PLT legs though; I'm sure there's a pro or ten who could step in and elaborate.
- cwzwarich 2y agoCyclone had borrowing. See Section 4.4 (Temporary Aliasing) in the paper https://homes.cs.washington.edu/~djg/papers/cyclone_memory.pdf https://homes.cs.washington.edu/~djg/papers/cyclone_memory.p... or the more detailed discussion throughout this journal paper: https://homes.cs.washington.edu/~djg/papers/cyclone_scp.pdf https://homes.cs.washington.edu/~djg/papers/cyclone_scp.pdf As their citations indicate, the idea of borrowing appeared immediately in the application of subtructural logics to programming languages, back to Wadler's "Linear types can change the world!". It's just too painful without it.
- caspper69 2y agoThank you. I appreciate the follow up and references. Now I've got some Friday night reading :)
- panstromek 2y agoCuriously, Rust compiler still uses the "region" terminology internally for lifetimes.