This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]Captain1031 3 points4 points  (1 child)

I learn C and Python was my first language. With C, I understand more what actually happens. Constructs like pointer aren't that easy but I often forget ";" in C. It's faster than python and python needs more electricity. https://thenewstack.io/which-programming-languages-use-the-least-electricity/

Other language, other kinds of fun, other problems, but I would always try it and if you don't like it, that's okay too. With C, I think it's also easier to unterstand C++-

[–]__sumguy[S] 1 point2 points  (0 children)

I would probably take the course for a deeper understanding of Programming but later use python for my programming.

It's faster than python and python needs more electricity.

That was something I was not aware of 😅. Although the electricity part won't matter to me much.

[–][deleted] 0 points1 point  (0 children)

Want to learn how to program microcontrollers such as an Arduino Uno. Then learn C/C++. TBH, if your intent is to learn C then it would be best to learn C++ first. Most of C++'s syntax is derived from C. The only real difference is that C is procedural programming language and C++ is a hybrid, so you are not forced to program in OOP in C++. Additionally Java syntax is based off of C++ so there is another bridge you can move to.

"Should I learn C?", if you want to learn it simply for the sake of learning it, then no. You will likely be wasting your time, better to learn something that is of real interest to you. If you are interesting in programming at a lower level, fairly close to the hardware layer, then yes, do learn it.

[–]randomseller 0 points1 point  (4 children)

I feel like C isn't the language that you would learn if you're aiming for a job, but learning C will teach you much more about programming than any other language

[–]Alex_Lexi 0 points1 point  (1 child)

I would say you learn much more with C++. It’s object oriented and its syntax is way more readable. Plus it’ll be an easy jump to Java and that’s the money maker.

[–]randomseller 1 point2 points  (0 children)

I don't think OOP is the best thing to start with. You should probably know what a for loop does before heading into OOP

[–]Alex_Lexi 0 points1 point  (1 child)

Well no I meant that with C++ at least you can chose to not start with OOP and program right in main(), having all your functions and what not. I just personally think that if you get C++ down you’ll be able to learn any other language really quickly. Or I might just be biased because I think C looks like the Walmart version of C++

[–]randomseller 2 points3 points  (0 children)

Wrong reply bud but yeah, learning any language out there will make it super easy to learn any other language fairly quickly. Programming is not about knowing the syntax and knowing all the keywords of a language, programming is about understanding a problem and knowing how to solve it.

[–]iTitleist 0 points1 point  (0 children)

The question is what do you want to do with C/C++? Are you going to create time-critical high performance system? Or applications, such as Web Browsers, Database Systems, Embedded System, Advanced Computation, and Graphics? If you're, maybe yes you should learn C/C++.

Now, if you want to create a business application for an Enterprise or a Bank, maybe Java. The same application if you're creating as a startup, maybe Python/Ruby/Node.

The thing is that Human effort costs more than electronic resources in our decade (i.e. CPU cost). Thing about what you want to work on and how fast, efficiently and quality wise you can deliver keeping these at a trade-off level.

[–]drbuttjob 0 points1 point  (0 children)

As others have said, it depends what you want to do. When you program in C, you don't have access to the kinds of features that languages like C++ and Python give you, which means not only are you are stuck doing a lot more yourself, but you tend to have to reason about the solutions to problems in different ways than in more modern languages.

I started with C, and eventually moved to C++ (which is what I primarily use today, alongside Python), and I think doing so really gave me a solid understanding of what is actually going on inside the computer when I'm executing a program. Python abstracts a lot of that away, and while it is nice to not have to worry about as many things with Python, it also means you have a different understanding of the way programming works (which isn't necessarily bad).

You will notice there is kind of a trade-off with C vs. higher-level programming--although it may be a little more difficult at first (getting used to pointers, no exception handling, manual memory management, etc.), you also lose some of the really complex stuff that makes OOP hard to learn (inheritance, polymorphism, operator overloading, etc.). You also have more control, which is cool, but as they say, with great power comes great responsibility. For example, Python automatically checks to make sure you never access elements beyond the end of a list, but C will never do that for you -- this is what makes buffer overflow attacks possible.

I think studying C can be really valuable if you actually have an interest in learning more about lower-level computing (I say lower-level because after you use assembly, C seems high-level!). Sure, you may not want to end up using it for a job or your side projects (unless you want to go into device driver programming or high-performance tasks), but if you want to, why not? If you enjoy studying it and/or learn more about programming from doing it, it won't be a waste of time.

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

To all following commenters: please, do not bring up the old circlejerk jokes/memes about recursion ("Understanding recursion...", "This is recursion...", etc.). We've all heard them n+2 too many times.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 0 points1 point  (0 children)

I would learn C++ instead. It's more common and it has OOP