3 ms·
> I wrote it this way because the systems people I talk to are skeptical at times that a compiler knows best. Well, the best way to combat that would be demons
by samth 13y ago
> I wrote it this way because the systems people I talk to are skeptical at times that a compiler knows best.
Well, the best way to combat that would be demonstrate that cool things can be done safely in Rust, but that probably requires a lot more than fits in your introduction.
I think you could allay that fear by addressing it directly, rather than saying that Rust's secret sauce is unsafety.
- steveklabnik 13y agoHm. I thought that talking about building ARC and discussing its implementation was something cool that directly addresses it. What would you like to see?
- samth 13y agoI think talking about how ARC is implemented in Rust is cool. I would just pitch it differently. I think what I don't like about your current description is that it makes it seem like unsafety is what allows you to _have_ Arc in the language. Instead, unsafe blocks are what allow you to _implement_ Arc inside the language. I'd start the footnote this way: --------------- A footnote: Implementing Arc So, the Rust language doesn't let us use shared mutable state in dangerous ways, but what happens if we really need to get down and dirty? For example, what if we wanted to _implement_ `Arc` ourselves? In fact, `Arc` and `RWArc` are both implemented in Rust. Inside their implementations, they use locks, low-level memory operations, and everything else you might see in a C++ program. However, anytime we use these features, we have to wrap them in an `unsafe` block. ... --------------- I hope that conveys the different emphasis that I'm talking about.
- steveklabnik 13y agoCertainly. Thanks. That's much more clear.