3 ms·
I have only a small dabbling in Rust and it was to create a Postfix milter. What was awesome was that someone had already written a Rust crate so that I didn't
by lbriner 4y ago
I have only a small dabbling in Rust and it was to create a Postfix milter. What was awesome was that someone had already written a Rust crate so that I didn't have to do anything too horrific. The compiler on Ubuntu just worked as expected but, of course, as something that is not standalone, Rusts strong type-checking did not save me from writing something that didn't work.
Part of the confusion is the very confusing (for a noob) difference between String and &str and as someone who has written C and C++, I don't have a problem with understanding references and addresses but I didn't find a very good explanation. This led me to writing code using the only way I could get it to compile that didn't crash at runtime (which was nice!) but it also didn't work.
The second issue was that being something plugging into an external daemon, at the interface level, we were getting a raw pointer and had to convert it into a string to use it. I tried so many combinations but couldn't get it to work but thanks to the maintainer of the Rust crate (who obviously knew what he was doing) he told me where my code was wrong and I fixed it.
So I guess good in that there were probably no horrific bugs, although this is much like C# or possibly Java. But yes, the strong checking doesn't stop things from not working.