Juliean said:
Partially. C++ and C share a similar foundation, you could say that.
No. C++ was built on top of K&R C. C is the foundation of C++. Nothing from C was removed from C++.
So there is no similar foundation for both, one was extended to become the other.
Juliean said:
But if you actually use modern C++, as it's intended
Do you mean the modern way is the intended way to use C++?
If so, that's just an opinion. But from all C++ code i see, only a very small part is actually modern. (where modern means to me: code that i can not easily read : )
If you mean just ‘good modern C++’, then this does not change that C is still part of that.
Juliean said:
C and C# are as different as can get.
I've had some confusion with both C# and Objective-C, when using those languages without actually learning about them. But i got away with it. My knowledge about C and C++ was sufficient.
I've also used php and JavaScript, without learning anything about them, and i got paid a whole year for it. (Ofc. i did learn some things along the way by catching up stuff from code and talking with webdev, but no actual effort spent on learning.)
All those languages adopt basic syntax, math and logic operations, function calls from C.
I made a game in Java for cellphones. Java is C++, but for dummies. Same thing.
But actually i had to treat Java like C to get the game below 64 kB. I could not use classes for space reasons.
That's what i mean. Ignoring poorly defined topics such as ‘paradigms’ (well, ‘poorly’ because i don't know nor care what this means):
You can code C, you can code them all.
So what language should we suggest to somebody, who does not know anything about all those languages yet, so he can't make a choice? It does not help if we say throw a dice and pick C#, Java, plus four others.
Juliean said:
Modules is the c++23 build system, and that one changes even how a c++ project is setup and used compared to C, entirely.
Yes, but irrelevant to a beginner, who ideally should not care about project management yet.
He should learn how to solve a given problem with a program.
Features such as constructors, destructors, needing to know when they are called by magic, class hierarchies, templates… simply all the extensions are not helpful for this early and primary goal. It's too much bloat and distracting.
They should be introduced only after that, with the motivation to write less for doing more.
Juliean said:
If you use all of the c++ language features, I'd argue it's much closer to a modern high-level language than it is to C.
What is easier to learn: C, or C++23?
And what is a ‘modern high-level language’ at all? This does not mean something concrete, it sounds more like a marketing promise, or a goal. Even an ideology, in your case.
That's not how you get started with programming. This becomes relevant only so much later.
But maybe it has turned out learning higher level languages first to beginners works better. I can't imagine, but idk.
Juliean said:
But than your actual usage of both languages is drastically different.
Tbh, my adoption of newer features was so slow and smoothly, maybe i just did not notice how much my coding has changed. Maybe i just simplify the experience down to ‘it's still just C, basically’, while somebody else, having the same experience, would notice a large difference.
Juliean said:
The new features in C++ don't make the language more complex.
This is a straight lie! :O
but i'll read on…
Juliean said:
But things like range-based for loops, unique_ptr, and so on all make the process of learning easier.
Nah. You should code those things out manually initially. Otherwise, it's a bit like using std::sort and then assuming you're done with learning about sorting.
But we may differ on the observed range of the learning process. I talk about the first weeks maybe. Not about becoming good or more effective, just about figuring out if you can do programming or not.
Juliean said:
You will of course say, “well if there is less language-features than it's easier”. I say, those features make the overall code less verbose, easier to understand, the opposite is the case.
No, at this point i agree with you. That's where i say ‘look out for a more powerful language, no need to keep stuck at low level, cumbersome C.’
Juliean said:
My original advice of using a high-level language like C# is an entirely different case. Those languages are very, very different in their core to C(++). You don't have to worry about memory managment at all. You won't get crashes, but meaningfull exceptions pinpointing the source of the problem.
Agreed as well. No problem if somebody starts with C#, or with the advise to do so.
However, moving from C# to C++ is probably harder than from C to C++. You don't need to unlearn anything.
Juliean said:
But modern tools, modern languages make the processes easier and easier.
The process as a whole, but not the start. I would say. But well, it's all opinions.
Juliean said:
From our previous discussions, my takeaway is that your own usage of C++ is more akin to what people call “C with classes”
I thought this might describe me, but actually idk what association really sticks at the quote.
If i read about programming paradigms, i read one and think ‘yes, that’s what i'm doing'.
Then i read the next one, and think the same. Same for the next. And the next.
But i'm surely not a Tausendsassa about paradigms.
I just don't understand what those programming nerds try to explain with their given list.
Then i become bored, come back here, preferring to argue with you about Jimmy Page vs. Tim Henson, or something like that. :D
Seamus_Arian said:
OOP. What is that?
It is on that list i have just mentioned. ; )