3 ms·
I got scared away by rust's syntax. I feel that people can learn rust faster if they know c++ beforehand. c++'s syntax is scary too. But there are different l
by billconan 6y ago
I got scared away by rust's syntax.
I feel that people can learn rust faster if they know c++ beforehand.
c++'s syntax is scary too. But there are different levels of c++. You don't need to use the scary part to make things work.
- cyberprunes 6y agoDisagree. Sure rust has a notable syntax tax (not what it used to be) but that's the easy part! It's the concepts and mindset that are the biggest hurdle in Rust. Going to C++ first won't help you there. If you already know it, great but Rust is a different language and you'll spend a lot time trying to transfer C++isms over until you realize writing effective Rust is not like writing effective C++ and you go through a process of unlearning. In my view, learning C++ for the purpose of learning Rust is massive waste of time.
- peterkos 6y ago> Rust is a different language and you'll spend a lot time trying to transfer C++isms over until you realize writing effective Rust is not like writing effective C++ and you go through a process of unlearning Ding ding ding! However I do think that the combination of syntax with the brand new concepts just adds that extra layer of complexity. A similar thing is Optionals in Swift -- the syntax is so baked into the language that even if you really understand how optionals work, the syntactic sugar keeps piling up in different situations. (i.e., first the ? operator, then implicitly unwrapped optionals, then if lets, guards, guard lets...)
- kd5bjo 6y ago> I got scared away by rust’s syntax. I’m curious about what you find scary about Rust’s syntax. I always found it to be a fairly natural extension of the syntax from C and other ALGOL-derived languages. Its semantics, on the other hand, took quite a while to wrap my head around. I am reasonably productive in Rust these days, and I still sometimes can’t predict whether or not the compiler will allow something.
- peterkos 6y agoAs a Rust newbie: macros, lifetimes, and (when I really first started), closures. All of that syntax just seemed so messy to me. The borrowing model was actually my favorite part because it not only was interesting, but made sense! And the syntax was relatively clean :)
- Avamander 6y agoNo, knowing C++ probably confuses you for a while, it has confused me.