Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In 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.



Cyclone had borrowing. See Section 4.4 (Temporary Aliasing) in the paper

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

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.


Thank you.

I appreciate the follow up and references.

Now I've got some Friday night reading :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: