Stream: t-compiler/wg-diagnostics

Topic: friendliest-compiler

memoryruins (Jan 27 2019 at 07:11, on Zulip):

from the incredibly entertaining presentation in

" One of the things I love about Rust, among other things is Rust, there's lots of kinds of different data corruption that Rust prevents. One thing is when you initialize a structure, you have to initialize all fields. And on the one hand, you are like, "Hey, Rust, get out of my grill. Why do I have to initialize all of these?" And then Rust should be like, "What's your problem? Why don't you want to initialize this? You're the one with the problem. You initialized this. Give me a value. Give it to me as zero, put a zero there. Fortunately, the Rust compiler doesn't get that belligerent with you. And actually, what's really funny is the Rust compiler has such a fearsome reputation for somewhat legitimate reasons just because when the borrow checker's angry with you, it can feel like, "I don't know what to do."

So as a result, the Rust compiler totally overcompensates. It is the friendliest compiler I've ever encountered, because Rust is like, "Oh, I don't think you meant this. I think you might have meant this thing. And here's exactly what it …" And it's like, "Look. I've got all these ASCII colors where I'm showing you exactly where it is." And you're like, "Why are you being so helpful? " "

Last update: Nov 15 2019 at 09:40UTC