3 ms·
I would say start with C. You won't appreciate a lot of the protection that Rust gives you until you have spent some time with the freedom to make the mistakes
by weavie 8y ago
I would say start with C.
You won't appreciate a lot of the protection that Rust gives you until you have spent some time with the freedom to make the mistakes yourself. Stuff like pointer arithmetic really helps you get into the mindset of how a program really executes. Rust tends to abstract this away and put in all these seemingly arbitrary (that's probably what it would feel like coming from a GC language) rules.
Plus C is well documented and supported everywhere. Tons of learning resources and you can guarantee that if you have a question someone else is bound to have had the same question and asked it. Rust, being newer, doesn't have quite as much.
- steveklabnik 8y agoPeople are split about C or Rust first. Some agree with you, but others prefer to have the assistance of the compiler, rather than suffering first. I think each approach appeals to a different kind of person.
- kbumsik 8y agoIt's not "suffering first". It is to learn how the hardware really works.
- steveklabnik 8y agoWell, C isn’t how the hardware works either, but beyond that... you get that with Rust too. I’ve had people tell me that they didn’t really grok the stack vs heap when doing C, but learning Rust taught it to them. As always, YMMV. I learned C 20 years before learning Rust myself.
- heavenlyblue 8y agoWell, the difference between the stack and the heap is quite rudimentary; to be fair.
- steveklabnik 8y agoSure, and it’s just an example. That’s not “how the hardware works” either, but my point is that Rust can and does teach systems concepts even though it may have a higher level of abstraction at times.