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
c
c++ is a consequence u have to know c
Thank u
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.
like a crash course?
Why don’t you just stick to rust?
Just curious
what do you mean by "after getting done with rust"
Rust is cool but by far not the standard (yet)
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
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
I would just do old c++ then without the c++11 and later stuff
Or C if you dont want the oop stuff
I decided to go and look at C
It's looking like javascript
What about c++?
Why?
Because it still forces you to manually take care of memory but its a bit more "modern" than C
@0xahmad
What about c?
has the same memory management system but its older
So just older c++ then check the modern stuff later on
Yes it gets a bit overwhelming and quite loaded with the new stuff because they only add stuff but keep backwards compatibility
And is there anything i'll lose if i didn't learn c?
Cause maybe i'll just stick with c++
The syntax for memory is different and the string handling is different
Otherwise I think you're not missing anything
What about pointers?
Is that the same
Yes
Thanks
should i learn c++ 11 or14,17,20?
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.
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...
What programming principles are you trying to learn / what kind of job are you trying to qualify for?
im more like a full stack developer but im trying to learn some low level things like compilers and kernels
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.
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
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