News for hackers. Stuff that matters.
Re:For Better Computing, Liberate CPUs from Garbage Collection by mafribe on Thursday May 09, 2019 @04:33AM (#19866412)

   possible for the Rust compiler 
   to infer most/all lifetimes)
I'd be interested to learn why you think this is possible. As you point out yourself, by Rice's theorem, precise lifetimes are not statically decidable. Rust's lifetimes are essentially based on nesting (think well-balanced brackets) and tracked by enriching the standard Damas-Hindley-Milner approach with a notion of affin-ness which is a weakening of Girard's linearity. Circular data structures immediately violate affine-ness. What mechanism do you propose to get around this conundrum?
Re:For Better Computing, Liberate CPUs from Garbage Collection by lllr_finger on Thursday May 09, 2019 @09:11AM (#19867928)
"All" might not be possible, but every Rust release tends to see improvements in lifetime elision. I just went through a few Rust apps I wrote 6 months ago and was able to get rid of nearly every explicit lifetime annotation thanks to improvements.

So there's definitely room for improvement, but also good progress being made.

Re:For Better Computing, Liberate CPUs from Garbage Collection by Hercuros on Thursday May 09, 2019 @05:27AM (#19866652)
I think that for function definitions in Rust you would in principle be able to leave out lifetime annotations on arguments/return values in more cases than is currently allowed by lifetime elision. I believe they don't allow this since it can become very confusing if the lifetimes are not written out when there are multiple references arguments. I'm not entirely sure about this, though.
Re:For Better Computing, Liberate CPUs from Garbage Collection by sanxiyn on Thursday May 09, 2019 @04:54AM (#19866510)
I know this is possible because Rust already does this. Rust's types in closures can be fully inferred. Try replacing all Rust functions with closures. It goes surprisingly far.
Re:For Better Computing, Liberate CPUs from Garbage Collection by timw4mail on Thursday May 09, 2019 @09:19AM (#19867991)
I'm not sure this would be possible for a standalone library, compared to a self-contained program, either.