Question Why do I keep reading that learning/understanding C language first will make you a better programmer?

vowew

Member
Joined
Dec 15, 2023
Messages
7
Programming Experience
Beginner
Hi,
I want to understand why I keep reading this idea or concept constantly.
I want to know the logic of that idea.
If anyone used C, C++, and C# to clear that for me, that would be awesome.
Another issue is that I keep reading that learning a language without object-oriented programming like C and then moving to an object-oriented programming language like C# will let you understand object-oriented programming better.
Again, I am not comparing or starting a language war, but I want to understand the logic behind that idea.
Thanks a lot for your valuable time helping me.
 
Solution
Another issue is that I keep reading that learning a language without object-oriented programming like C and then moving to an object-oriented programming language like C# will let you understand object-oriented programming better.

I actually disagree with this statement. In my opinion, it will actually hinder your progress in learning object oriented programming, because you will want to back to doing things the procedural way, rather than the object oriented way if under time pressure or just "want to get things done to focus on more interesting stuff". This is very much like wanting to do things the procedural or object oriented way when learning to use a functional language instead of the doing things the functional way, or...
Event driven for a Windows console app doesn't need to be fully integrated into the Windows message pump/loop. It could be as simple as the classic Borland Turbo Pascal/C/C++ programs that have their own main loop that waits for keys and mouse inputs, or it could be like node.js which has its own main loop and events.

But any which way, it takes a different mindset to write code for event driven versus the classic beginner console program where the code and user interact in a ping-pong like manner. Very much like there is a different mindset between writing procedural vs object oriented code vs functional programming code; or like the difference between writing beginner Python code vs how an experience Pythonista will write code.
 
Event driven for a Windows console app doesn't need to be fully integrated into the Windows message pump/loop.
I think that any other kind of events are too advanced for beginners. For beginners. rather than using console programs to learn event-driven programming, I think it would be better to learn GUI programming.
procedural vs object oriented code vs functional programming code
I don't know; I do not think in terms of procedural and functional and as far as I am concerned they and OOP are the same. I do not see much difference among subroutines, procedures, functions and methods, except I know people like to use different words to make something sound different. Therefore I am unable to guide a beginner in such topics.
 
Slightly off topic. This recent article about getting a C compiler for the C=64 reminded me of my language learning journey.

I first taught myself BASIC on my dad's Pocket TRS-80 when I was 9. I then moved on using BASIC on a friend's Apple II and a Commodore 64 I got for my birthday. In the search for more speed for my BASIC programs that even Compiled BASIC couldn't provide, I taught myself 6502 assembly when I was 12, and then Forth. In college, their preferred Intro to Programming language was Pascal, followed quickly by teaching both C and Motorola 68000 assembly at the same time. As much as it sounds painful to do those two languages at the same time, especially for folks who only ever had programmed in Pascal, it actually made understanding pointers, the stack, and memory layout so much easier. And then after that we learned C++, but unfortunately, the teacher who was teaching C++ was teaching it more as "C with classes", rather than truly in an object oriented way. We also learned some LISP, SQL, and x86 assembly. It was only when I started working at a software development company, and I had a former Philosophy major as my manager and mentor, did I finally grasp the object oriented way of using C++.

Since then, I've branched out and learned several other languages, but currently C# holds the most of mindshare. Currently teaching myself Rust.
 
Last edited:
I first taught myself BASIC on my dad's Pocket TRS-80 when I was 9.
You are lucky to have been young when computers were small enough and affordable enough to fit in your pocket. When I first began learning computers I had to go 5 miles and then I could use the computer only on Saturday and I got only a few test runs a day.

their preferred Intro to Programming language was Pascal
Pascal and languages like it should have been used in computers instead of BASIC much more than they were in minicomputers and microcomputers and PCs. Pascal was explicitly designed to compete with BASIC for use in computers with limited resources.
 
Personally, I would say that it is a benefit to already understand lower-level languages like C when learning higher-level languages like C#. That said, if you're starting out now with the intention to learn C#, I would say that it's not worth the time to learn C or the like first. I learned how to program in Fortran and Pascal first, then C, then C++, then VB.NET and then C#. Learning VB.NET and C# was quicker because of my existing knowledge but, if I was starting from scratch, the time to learn C, etc, would be greater than the extra time it took me to learn C#. If you spend months learning C first then someone who spent those months learning C# will be ahead of you and will likely stay ahead for some time. If you want to be able to write unsafe code, i.e. code using pointers, in C# then understanding C/C++ is a definite advantage but the vast majority of C# developers will never need to do that.
 
The C language has standard functions that are typically implemented in libraries; they might be referred to as the runtime. They can be used in C++ too but C++ has standard classes that can do most everything the C standard functions can do. Generally speaking, there is no need to use the C functions when using C++. There are exceptions, such as for C++ strings we need to sometimes use C style strings. Except for the C standard functions and the C++ standard classes, C and C++ are very much alike. Knowledge of the C standard functions has insignificant benefit for understanding other languages.
 
Knowledge of the C standard functions has insignificant benefit for understanding other languages.

As it is, that's just an assertion. Do you have anything to back that up? I'm not saying you're wrong but you haven't shown that you're right.
 
As it is, that's just an assertion. Do you have anything to back that up? I'm not saying you're wrong but you haven't shown that you're right.

I am not aware of any significant correlation of C standard functions and equivalent features in other languages. I assume that others with experience with multiple languages would agree. I hope that if I am wrong then someone can explain how the specifics of the C standard functions help to understand other languages. If a beginner is told that they must learn C first then I think these are good questions to ask the person saying that they must learn C first. As far as that goes, I think you haven't shown that you're right would also be a valid response.
 
For me, learning the C library functions and the various OS level C functions did not directly help me understand any other languages. What it indirectly did was train me to take time to read the documentation. Getting into the habit of reading the documentation helped me understand other languages better. But then it's equally true with any programming language -- they can also train you to also take time to read the documentation -- unless you are a copy-and-paste coder, or you blindly use Intellisense or its equivalent in your editor. But in that case, that's a function of learners attitude towards learning how to program.
 
I am not aware of any significant correlation of C standard functions and equivalent features in other languages. I assume that others with experience with multiple languages would agree. I hope that if I am wrong then someone can explain how the specifics of the C standard functions help to understand other languages. If a beginner is told that they must learn C first then I think these are good questions to ask the person saying that they must learn C first. As far as that goes, I think you haven't shown that you're right would also be a valid response.

I apologise. I misread your post. I read "insignificant" as "significant".
 

Latest posts

Back
Top Bottom