4 ms·
For whatever it’s worth: I think it’s harder to learn rust as a C++ programmer than it is for a new programmer. Reason being that you have to unlearn your para
by dijit 4y ago
For whatever it’s worth: I think it’s harder to learn rust as a C++ programmer than it is for a new programmer.
Reason being that you have to unlearn your paradigm before you’re able to learn the new paradigm; and it’s made slightly worse by giving the appearance of similarity (since certain concepts map directly, like flow control and loops).
- proto_lambda 4y agoOne big hurdle for C++ programmers learning Rust that I've seen time and time again in various community support channels is fixing their trust issues with the compiler. They are so used to compiler output being useless or worse than useless, they are unable to take advantage of rustc's stellar diagnostics (which frequently tell you exactly what you need to change to make things work) until they force themselves to actually read and internalise them. Once they realize that the tooling is actually working _with_ them, not _against_ them, they start to pick things up much quicker.
- lionkor 4y agoIn my experience only beginners have this issue, as a C++ programmer the compiler is my best friend.
- scoutt 4y ago> big hurdle Without going much further, to me it's the syntax. I can write some Rust lines of code, and I appreciate the compiler output to correct my syntax. But it's really difficult to me to read code written by others. I can't open a random file of a Rust project and have a minimal clue of what's going on After years of C and some C++, I have a parser implanted in my cerebellum, and it's hard to adapt it to Rust. To me, reading Rust feels like forcing an optical nerve to see something very small. Case in point, the code in this article.
- bilkow 4y agoOh yeah, I feel your pain, my brain is really used to Rust/Swift and Python syntax, and when I have to read Typescript/React, C++ or something like Nix, it gets hard for my brain to parse it. Loved the eyesight analogy!