Live data from Hacker News

Ask HN: Rust or C or C++ in 2023?

news.ycombinator.com

1–10 of 56 posts

Re: Ask HN: Rust or C or C++ in 2023?

#2
C is the best choice to learn systems programming.

C is the simplest of C, C++, or Rust and most other languages have C interop or foreign function interface.

First learn C and then you can learn Rust or C++ if needed. The concepts you learn in C programming will help you to better understand the more advanced concepts used in Rust or C++.

Recommended first book:

https://en.wikipedia.org/wiki/The_C_Programming_Language

Re: Ask HN: Rust or C or C++ in 2023?

#3
I would choose Rust because it has much better developer ergonomics than C. Even the little things like having a standard linter and package manager (Cargo) go a long way in writing idiomatic code. You can't go wrong with either choice, so choose the one that makes you most productive.

Re: Ask HN: Rust or C or C++ in 2023?

#4

C is the best choice to learn systems programming. C is the simplest of C, C++, or Rust and most other languages have C interop or foreign function interface. First learn C and then you can learn Rust or C++ if needed. The concepts you learn in C programming will help you to better understand the more advanced concepts used in Rust or C++. Recommended first book: https://en.wikipedia.org/wiki/The_C_Programming_Langua…

Agree that C is easier to explore the concepts in, but knowing enough C to know why e.g. [0] gets the behavior it does is IMO not useful if the goal is to learn the _concepts_ before switching to a language that doesn't do this kind of thing.

So, IMO worth jumping to Rust as soon as you feel confident with the stack vs the heap, use-after-frees, etc.

[0]: https://godbolt.org/z/x7bf4edo9

Re: Ask HN: Rust or C or C++ in 2023?

#10

C is the best choice to learn systems programming. C is the simplest of C, C++, or Rust and most other languages have C interop or foreign function interface. First learn C and then you can learn Rust or C++ if needed. The concepts you learn in C programming will help you to better understand the more advanced concepts used in Rust or C++. Recommended first book: https://en.wikipedia.org/wiki/The_C_Programming_Langua…

Biases because that's how I learned, but yeah... I agree. Learning C will help you be a better programmer in any C-like language.

C forces you to think like a programmer. Once you grasp that, you can learn most other languages with relative ease.

Maybe not counting Lisps.

Post reply on HN