News for hackers. Stuff that matters.
Re:The reference D compiler is now open source by burntsushi on Friday April 07, 2017 @05:26PM (#14063631)
Note that the vast majority of lifetimes in Rust are elided so that no explicit annotation is required. When the compiler can't figure out the annotations, or if you're declaring a type that contains a borrow, then you need annotations.

The annotations have, for the most part, faded into the background for me. I don't find them to be particularly pervasive in the code I write, and when I do need them, it's usually to fix a reasonably straight-forward case where the compiler failed to elide them. With that said, in the years I've been using Rust, I have committed one or two lifetime-related bugs. (No memory unsafety resulted, of course, but it did result in data being annotated with a shorter-than-actual lifetime.)

> In short, I thought Rust was "we solved the pain of this difficult thing."

Part of the pain that Rust purports to solve is the significant reduction (and debugging thereof) of memory unsafety errors. In return, you must deal with the pain of an ownership and borrowing system, which might present challenges to patterns you may have used in another language. The benefit is that you have a compiler to tell you when you've mis-stepped instead of an end user filing a bug report (or worse).

Re:The reference D compiler is now open source by theprotocol on Saturday April 08, 2017 @08:28AM (#14066591)
I agree with your characterization of the benefits and tradeoffs of Rust. I think that regardless of whether it solves the pain point, at the very least there needs to exist something that undertakes static lifetime checking. I respect Rust from a distance. It's not in line with my particular needs and/or expectations, but I'm glad it exists, because something needs to exist which does what Rust does, and I'm not aware of anything else that does it.

Other than lifetime annotations, I have a couple other niggling issues with it but I suspect it's because I haven't fully grasped certain things yet, and so I'll refrain from commenting on them for the moment.