4 ms·
I thought myself a pretty decent C coder, certainly someone who was conscientious and took safety seriously. I am nevertheless often humbled when programming u
by rectang 2y ago
I thought myself a pretty decent C coder, certainly someone who was conscientious and took safety seriously. I am nevertheless often humbled when programming unsafe Rust as I discover aspects and errors I had not anticipated or thought through. I don't attribute this to Rust, but instead to the deceptively difficult problem domain.
- WesolyKubeczek 2y agoAre things you have learned so far transferable back to C? Can you with your new experience consider yourself a better C coder?
- deleted 2y ago[deleted]
- ChristianJacobs 2y agoNot the parent poster, but in my experience - yes. I mainly program in C++, and the past 5 years or so of writing Rust has drastically changed the way I write code (in general). Sometimes, if the problem is particularly hairy, I'll even write the code in a similar way in Rust first and then port it back to C++ after the compiler has helped me iron out my mistakes.
- vacuity 2y ago> but instead to the deceptively difficult problem domain. It's definitely a big part of it, but I think sometimes it is a Rust thing. Of course, motivated by the essential complexity, but accidental complexity is still complexity. I don't think or hope it's an existential issue for Rust, which is good. The sharp edges around pointer-reference nuances in unsafe, for instance, are being addressed by things like raw references (mentioned upthread). I think languages that explore this problem domain more might provide interesting alternative designs for what Rust handles through unsafe.