Eight Years of Service
Posts: 128
Threads: 13
Points: 18NSP
C as a first language? 01-06-2017, 08:01 PM
#1
Well, not really first language. Perhaps first official language. I have experience in Python, but I haven't done more than really dabble. I have officially started learning C, and I plan to keep at it until I git gud. I picked C because I want to do a lot of low-level work, and eventually move onto and learn Assembly.
Considering that I don't have to learn the basics of programming in general, such as what a variable is, is there any reason why C wouldn't be a good language to master first?
"The more we learn, the more we realise how little we actually know"
•
Ten Years of Service
Posts: 1,192
Threads: 51
Points: 72NSP
RE: C as a first language? 01-06-2017, 08:23 PM
#2
C is definitely an interesting pick as a first language. If you do pick it as a language, you will probably realize that learning higher level languages with C-Like syntax such as C++ or Java to be easier than if you did not know C. You will also breath in the fresh, clean, and sometimes absolutely wonky air of automatic garbage collection.
That being said, there are a few reasons why C is not a good first language:
Manual Memory Cleanup: you're going to have to pay extra attention to how you allocate memory, because you have to do it manually in C! (languages like Java or C++ do this for you with a thing called 'garbage collection')
General fuckery: C being a low level language, there is alot of general fuckery that can happen while you program. EX: You print out a variable but instead of the string you assigned to it you get a bunch of garbage characters (A product of not assigning a Nullbyte or not clearing the memory space of the variable before you print it out/assign stuff to)
However, C is, in my opinion, one of the best first languages to learn. Here's why:
It's extremely simple. Kerrigan and Richies "The C programming language" ( The official C book written by the creators) is really small. In fact, it's probably smaller than most of the books you have on your bookshelf, and it's under 300 pages long (at least the copy I own). Comapred to the official C++ book. this is a huuuge difference.
Because C is such a simple language, it's not so overwhelming to tackle as a first language as, say, C++ or Java is. The fundamentals are simple, and it's quite easy to build and grasp critical Comoputer Science concepts with the language without having to deal with too many extraneous concepts. Additionally, since C is low-level, you will be able to see more of how the language interacts with the components of a computer, rather than just guessing at what's happening with a more abstract language.
Finally, learning C will help you with other languages. alot. After you get C and you move on to, say, C++ or Java, and you're building a linked list and something goes wrong. The guy sitting next to you may have no fucking clue what's going on. But you can say "Oh, That's because XXX isn't being released properly by java's shit garbage collection, I know exactly how to fix this!"
Also, with the advent of the IoT world, alot of these devices are built on C. This means that jobs in C will go up and it will become a language that is more in demand. You can actually already see this on many "Top 10 in-demand languages to learn for 2017" lists. Sure, go into any programming IRC chat and say you're building something in C. The most likely response is "C!? WTF? I havent seen that since my great-grandfather passed on his most-valued program to me? Why are you using C??". But fuck that, fuck them, C is still one of the best languages in my opinion. It's fast, it's portable, and hell, you can do anything you want with it. The modern world runs on C, so it's worth learning.
(This post was last modified: 01-06-2017, 08:26 PM by insidious.)
Email: insidious@protonmail.ch
Nine Years of Service
Posts: 98
Threads: 10
Points: 81NSP
RE: C as a first language? 01-07-2017, 01:47 AM
#9
C is a good language, but as to whether it's been around for years or not, it really doesn't depend on the language as much as the compiler that you're using. There's a lot that don't fully support ISO C99 or C11 for instance, especially if you're on Windows. C may have been around for a while but it's evolved over the years too, just not as much as C++, but big companies like Microsoft have put much more effort into working with support for C++ rather than C. C is still a good language though, but don't expect to be writing code using all of the new C11 features with flawless results 100% of the time.
(This post was last modified: 01-07-2017, 01:47 AM by bitm0de.)
- mostly braindead monkeys on this forum.
•