News for hackers. Stuff that matters.
Re:Rust means never having to close a socket by dkhenry on Tuesday October 07, 2014 @01:05PM (#8422343)
If I understand the borrowing and lifetime mechanisms of rust it would be trivial to have it say anything that has a lifetime that is active at the end of a scope is a compiler error.

It would almost be like how in c++ you can disable copying by setting all the copy constructors to delete and then the compiler will tell you if your accidentally making copy's of objects.

Re:Rust means never having to close a socket by tomp on Tuesday October 07, 2014 @01:08PM (#8422371)
I agree, it would probably be trivial. It's mostly a language/library design issue, not a type-systems research problem.
Re:Rust means never having to close a socket by steveklabnik on Tuesday October 07, 2014 @01:11PM (#8422400)
You're talking about linear types, Rust implements affine types. They're very similar.