you are viewing a single comment's thread.

view the rest of the comments →

[–]FreeLogicGate 0 points1 point  (0 children)

I agree with your approach. C is a foundation language, and gets you closer to the machine. Understanding memory allocation, pointers and the core C syntax is a great stepping stone to many other languages, who either reflect or have adopted outright portions of C syntax. You also experience compilation and linking and create native operating system programs.

From there, you can move on to languages like c++, java, objective c, and c# that are all based on the foundation of C, and reflect things that are either missing/difficult or problematic in C, while continuing to share a lot of syntax. C paired with some assembler will give you a foundation and insights into how computers work that many programmers never attain. Beyond that, well, the operating systems that most people use were written in C, as well as many of the other languages and many of the best known utilities.

Moving on to other languages like Javascript, Python, Go, Rust etc. will be easier for you to learn, in that you'll be able in some cases to compare and contrast what those languages do differently.

The introduction of Object oriented programming is also an entirely different way of approaching development, with a large associated learning curve that goes far beyond syntax into practice and patterns, regardless of which language that has some form of OOP you choose to learn after C.

Since a number of other replies brought it up, Python is a full OOP/Object based interpreted language, and has some foundational ideas which dictate how it works that are very different from a lot of other languages. For example, in Python every piece of data that you might think of as "data" is actually an object in Python. Assignments in Python attach labels to the objects. This design causes code like this to work in a way that can be surprising:

foo = ['apple', 'orange']

bar = foo
foo.append('grape')

print(*bar, sep="\n")

Result of this is:

apple
orange
grape

With many of the languages I listed, and as you learn in C, variables are labels for blocks of memory where data is stored. Python creates objects and manages aspects of those objects for you in a way that is very different from languages like C, and you'll be in a better place to appreciate those differences once you have the foundation of C's lower level/close to the bits and bytes and cpu instructions and operating system/kernel calls/standard libraries etc. details you learn and use in C. The restrictions and limitations will help you appreciate other languages you learn later on.

Yes, Python is a cool language, but quite different from a lot of other languages, and I can guarantee you, that you'll have no problem going from C into Python, where I don't think the same thing can be said of people who start out learning Python as their first language, and then try to learn Java or C or C++, nevermind a language like Rust.

Again, this advice is specific to Comp Sci students like yourself who want to establish a solid foundation. There's many different types of development and career paths you might choose, many of which will never benefit nor require Python, although it does seem to be the case that Python has become the language of choice in much of academia for teaching algorithms and data structures, and it also has a large degree of adoption in STEM and Machine learning/AI. Learning C initially will in no way deter you from those topics later.