C first or C++

I'm currently learning Rust and its the first low level lang im learning im familiar with programming and im thinking to go further to c or c++ but im not sure which one should i start with nd maybe i'll drop the other one if it serves my needs. I still don't knw that much in DSA and low level stuff. So idk if should i start with c or c++ first after getting done with Rust
29 Replies
Andrea Peverelli
Andrea Peverelli16mo ago
c c++ is a consequence u have to know c
Lumberjack
LumberjackOP16mo ago
Thank u
Glenn
Glenn16mo ago
Do C for a liiiittle bit and then go to C++ asap. Learn the bare-bones and the get to know the C++ stl afterwards. And don't get into much into the whole inheritance stuff. You don't want that when writing performant code.
Lumberjack
LumberjackOP16mo ago
like a crash course?
Keef
Keef16mo ago
Why don’t you just stick to rust? Just curious
cje
cje16mo ago
what do you mean by "after getting done with rust"
Glenn
Glenn16mo ago
Rust is cool but by far not the standard (yet)
Keef
Keef16mo ago
I just dont want them to spread themselves out too thin. You can use rust to learn low level programming but when you are just dipping your toe into it the last thing you should be doing is grabbing another language that you'll have to grasp the syntax without the actual important parts
Lumberjack
LumberjackOP16mo ago
I want to understand low level programming in the old standard way. Cause Rust has weird way to write/understand Code and different memory management Pattern ownership After finishing the book, doing some projects to get more familiar with Rust env
Linus
Linus16mo ago
I would just do old c++ then without the c++11 and later stuff Or C if you dont want the oop stuff
Lopen
Lopen16mo ago
I decided to go and look at C It's looking like javascript
Lumberjack
LumberjackOP16mo ago
What about c++? Why?
Linus
Linus16mo ago
Because it still forces you to manually take care of memory but its a bit more "modern" than C
Lumberjack
LumberjackOP16mo ago
@0xahmad What about c?
Linus
Linus16mo ago
has the same memory management system but its older
Lumberjack
LumberjackOP16mo ago
So just older c++ then check the modern stuff later on
Linus
Linus16mo ago
Yes it gets a bit overwhelming and quite loaded with the new stuff because they only add stuff but keep backwards compatibility
Lumberjack
LumberjackOP16mo ago
And is there anything i'll lose if i didn't learn c? Cause maybe i'll just stick with c++
Linus
Linus16mo ago
The syntax for memory is different and the string handling is different Otherwise I think you're not missing anything
Lumberjack
LumberjackOP16mo ago
What about pointers? Is that the same
Linus
Linus16mo ago
Yes
Lumberjack
LumberjackOP16mo ago
Thanks should i learn c++ 11 or14,17,20?
Linus
Linus16mo ago
Every version adds new stuff so you can just work your way up from c++11. They don't actually do anything for learning low level memory management though. Things like smart pointers just hide the actual memory management in templates.
Linus
Linus16mo ago
https://youtu.be/rX0ItVEVjHc?si=EuSNMrT0vKVmdaa6 if you are interested in more data layout and memory management this talk is also pretty interesting
CppCon
YouTube
CppCon 2014: Mike Acton "Data-Oriented Design and C++"
http://www.cppcon.org -- Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2014 -- The transformation of data is the only purpose of any program. Common approaches in C++ which are antithetical to this goal will be presented in the context of a performance-critical domain (cons...
yhakbar
yhakbar16mo ago
What programming principles are you trying to learn / what kind of job are you trying to qualify for?
Lumberjack
LumberjackOP16mo ago
im more like a full stack developer but im trying to learn some low level things like compilers and kernels
yhakbar
yhakbar16mo ago
You might want to take a look at OCaml. That's what the Rust compiler was written in before it was self hosted. Rust is starting to be used in Linux kernel dev, but it's probably safer to learn C (and ignore C++ for now) if you want to write Kernel code, IMO.
Lumberjack
LumberjackOP16mo ago
Well also im willing to make ui toolkits, native libs for some frameworks like react native or any other framework. Or just making my own custom framework for web or app dev. That's why im thinking to go for C++ since its the most used lang in this things but idk about OCaml tbh
Lopen
Lopen16mo ago
I think the c -> c++ route is fair enough Just like web dev Html -> react/vue etc Just grasp the basics of c because c++ is becoming modern
Want results from more Discord servers?
Add your server