Re:Show HN: Rust, ARM Cortex M, and a Generated HAL
by rdtsc on Monday September 26, 2016 @11:21PM
(#12587230)
Knowing C, and liking Rust and struggling to learn it. I think Rust is more like C++ than C in the type of difficulty of learning.
C is more like chess: the rules are not that complicated and you can figure out how to write code. It will be a long time to learn to write good C code.
With Rust it is hard to figure out the rules, even to get start writing code. They are more like complicated board games with lots of rules to learn.
As an aside, after I wrote that it reminded me of this map: http://goldns.ru/cppmap-2012.png C++ devs will get all the inside jokes there, Alexandrescu's castle, curiously recurring template, exceptional swamps and others...
Re:Show HN: Rust, ARM Cortex M, and a Generated HAL
by sidlls on Tuesday September 27, 2016 @02:29AM
(#12587815)
Rust seems very much like modern C++. Borrowing, references and the like have nearly direct analogs to C++ references, unique_ptr and other STL constructs. Except the compiler enforces them with (my opinion) relatively more clear error messages most of the time and in some cases the syntax is actually clearer (others not necessarily).
My biggest struggle so far is overcoming the differences in the implementation of generics. I have yet to "fight the borrow checker," but the generics implementation is something of a hurtle for me.
Rust makes you come to grips immediately with the things that will bite you in C later.
Keep at it. It's a continuing process regardless of language.