Re:Rust 1.43
by valera_rozuvan on Thursday April 23, 2020 @12:40PM
(#22957870)
If you are like me, and stick to Rust lang for about a year or so, you will have a hard time going back to low level languages such as C. When you have your errors caught at compile time - it's simply beautiful! Forget about explicit memory freeing - and don't worry about memory management, it is really predictable. Code will always have the same precise meaning across all platforms. Hell yeah!
[ Parent
| on HN ]
On the bright side, I definitely write safer C code now after wrapping my head around Rust. I'd much rather have the compiler tracking lifetimes than my own imagination though.
Re:Rust 1.43
by anarchyrucks on Thursday April 23, 2020 @01:10PM
(#22958231)
I finally "understood" C++ after writing a bit of Rust and studying the ownership principle.
It took me a little while to get my system down, but once I'd figured out how to build and call in Rust libraries using CMake and the the C ABI, I do my best to write as little raw C++ as I can.
Using the Rust test framework, limiting direct memory management to the low number of unsafe functions I need to pass raw data/pointers across that FFI boundary, being able to count on the compiler to check if I'm doing something dumb, and being able to easily add other dependencies into that Rust .so/.a file product Cargo have all been huge productivity boosts compared to pulling out valgrind/gdb whenever I run into a segfault because I've done something stupid.
After years of watching Rust excited, I finally have an opportunity to use it this year, and I'm loving it. Like you say, going back to C feels weird and cumbersome (ugh I have to free this in _how_ many places?).
Re:Rust 1.43
by ccktlmazeltov on Thursday April 23, 2020 @05:46PM
(#22961889)
same here, I will never write C or C++ again