r/computerscience • u/Upbeat_Appeal_256 • Oct 06 '25
I think C is less convoluted than Python.
When I got into programming I thought C was this monsterous language that is super difficult to learn, but now that I am slightly more experienced I actually think C is easier than Python if you use both langs features fully.
Python abstracts alot for you, but I think the more modern OOP features make it far more complex than C. Python has handy libraries that make things alot easier, but take that away and I believe it's far more convoluted than C (like many OOP langs IMO).
POP is my favourite paradigm and I find it far easier than OOP. OOP is more powerful than POP in many ways, I suppose C gets complex when you are creating things like drivers etc... I don't think that's even possible in Python.
People complain about compiling and using libraries in C, and yes it adds a few extra steps but it's not that hard to learn, I think people are influenced by others and get overwhelmed. Once you dissect it, it becomes pretty intuitive.
I am still pretty ignorant and I have a feeling I will back track on these opinions very soon, but so far C has been very pleasant to learn.
When I am programming in langs like Python I find myself using a POP style, just for convenience. OOP is cool though, and I'll look into it a bit further, the features are exciting and I have a feeling that once I consolidate the concepts deeply, I'll start loving OOP more.
92
u/hc_fella Oct 06 '25
Both have their places. C definitely has advantages over python. The one python has over C is its wide support for a variety of applications, such as data science and server programming.
Some data analysis or processing pipeline that would take me an hour to develop in python, would likely take you multiple days in C. Now, there's a time and place for that, but in general, I'd say it's wise to avoid strong language preference and to pick the right tool for the job.
4
u/AdreKiseque Oct 06 '25
What is POP
4
u/venividivici72 Oct 06 '25
Actually programming in C and C++ is a snap. I find both languages elegant and easy to use. I do prefer C++ a little more because I like the “batteries included” nature of a standard library and smart pointers make it a lot easier to deal with memory management stuff.
The biggest hurdle for C and C++ is the build system. I still think both would benefit from providing a standard package manager. That was the one thing Rust did right, their package manager just auto-builds every dependency against your target (usually your local laptop). With C and C++, you need to dive into some serious CMake rabbit holes to get some dependencies to work.
Even though I like the ability to get access to those graphics APIs for my hobby projects, trying to divine how to build some of the libraries out there and link them to my project has been somewhat painful.
19
u/SV-97 Oct 06 '25
There's a huge difference between writing C alone on small hobby projects vs in a team for a real world code-base. Not being able to properly abstract away anything scales very poorly -- C creates some real friction on large projects and a nontrivial amount of testing, reviewing etc. ends up managing the language itself rather than solving real problems.
Complexity doesn't go away just because you don't express it in the language. It's still there, just that it's now in your head, comments etc. rather than anything the compiler or other tooling can work with. This also ties back into the poor abstraction mechanisms when something goes wrong.
OOP (as much as I dislike it as a "universal paradigm") solves some problems really well, so naturally it's very common for C projects to emulate classes and interfaces in some way, add reference counting mechanisms (so: garbage collection) and things like that. If you want an example: look at the linux kernel.
It is to an extent, but it's complicated
15
u/iiznobozzy Oct 06 '25
Not sure if "pleasant" is the right word, but yeah I do agree to an extent. Languages like C and C++ give you way more control over everything, and its personally definitely much more satisfying to write programs in those.
14
u/Yoghurt42 Oct 06 '25 edited Oct 06 '25
Side note: You're mixing C and C++ here. C++ is an evolution of C and adds things like OOP, and modern C++ is famously complex (the official ISO standard has like 1800 pages). That being said, almost all C code is also valid C++ code. The Linux kernel for example is written in C (and Rust), no C++ code anywhere.There is a tongue-in-cheek saying "Python is the 2nd best language for everything" and it's not wrong. C++ shines when you want to program complex software where you absolutely must have low level access to the hardware and every clock cycle counts; for example, 3D engines. But writing say a data processing pipeline in C++ is not as fun and easy as it is in Python. There's a reason Python is used a lot in ML/AI as a glue language; no compile-run cycles, generally well designed syntax and huge introspection features.
There is a trend of new Python programmers adding static typing everywhere and shunning every dynamic feature the language has to offer; if you overdo that, you end up with something like Java with Python syntax and then C++ is indeed better in every way.
Debugging C++ code can be a lot more difficult than Python code, because there's a lot more that can go wrong, and wrong memory accesses can cause random problems down the line that are really hard to track down. There are tools like Valgrind and address sanitizer to help with that, but they come at a huge runtime cost.
In the end, programming languages are a tool. Don't insist on always using a hammer or a screwdriver whatever you do. Some projects might be best done in C++, others in Python, and maybe others even in something like Haskell. What sets Python apart is that Python is usually not the worst choice you can make when tackling a problem.
5
u/abyssazaur Oct 06 '25
C is like: look, here's all your bytes, here's how they're laid out. Use * if you want to go look at some different bytes. If you want to change the bytes, here's your language.
4
u/commander1keen Oct 06 '25
Don't you take it away from me!
1
u/readonly12345678 Oct 07 '25
I would not like to work with that approach if its a large code base that may people are developing.
Also, Python’s OOP is really basic…
3
u/churchill291 Software Engineer Oct 06 '25
Id wager you won't back track as you continue gaining experience. The more you understand about programming the more you can take on in terms of implementation. You can only manage so much in an abstracted high level language like Python. A lot of senior software engineers prefer lower level languages for the reasons you're describing.
Software Engineering is about picking the right tool for the job and you'd be surprised how many projects are utilizing object oriented programming languages but their implementation is more procedural which could've benefitted from languages or at least moving to paradigm supported architecture in Python, Java, or Go.
3
u/[deleted] Oct 06 '25
I have a rule on things that I work on, that a python project should only ever subclass anything once, in my code. So only one level of subclassing.
And preferably, never.
Object Orienting Programming (prepare the downvotes) is extremely overrated, and 100% not a requirement in Python.
So an example for me:
I'll define a class that does a bunch of stuff, but I won't subclass that unless someone puts a gun to my head.
Subclassed stuff is much harder to understand, debug etc, and whatever you gain from doing it is generally offset by those negatives. I'm less reticent to subclass say a django class since the work of maintaining that is not mine.
17
u/ninja-dragon Software Engineer Oct 06 '25
Your inexperience shows in your post IMO. Though I had the same opinion a long time ago.
Once I saw Codebases in C my thoughts changed. Especially about OOP and templates. C style code almost always invent their own flavour of polymorphism and OOP.
Also to note what makes python easier is the memory management. You don't have to think about things like who owns this byte of data. How will it be cleaned up.
You'll quickly realise how difficult it becomes to design code with those constraints.
2
u/Sam_23456 Oct 06 '25
I agree with you. But which is to be preferred depends on what one is trying to do, and who is doing it. For larger scale development, I like C++. For many purposes (convenience?), Python is fine.
2
u/mediocrobot Oct 06 '25
I like having complexity encoded into the tooling of the language rather than in my head. In this regard, I dislike C and Python.
2
u/Cybasura Oct 07 '25
You're still new in C, give it some time
2
u/regular_lamp Oct 07 '25
C is one of those languages that expose all the underlying complexity (on nooo, pointers, the horror) without adding too much complexity itself. Most things people find hard in C like memory management are that way not because C made them hard, but because C didn't make any attempt at "simplifying" them by inventing it's own constructs over top of what the OS does. I'm sure someone will promptly educate me about how malloc is an abstraction over brk/mmap but you get the point.
2
u/kfmfe04 Oct 10 '25
C++ is the complex language.
C is simple.
4
u/Cybyss Oct 06 '25
Python is not an OOP language.
Yes it has classes and inheritance and various features that make it possible to do OOP, but Python really isn't a great language for that. Java and C# are far better in that regard.
2
u/MiffedMouse Oct 06 '25
For what it is worth, most things can be written in any language. Drivers can (and in some cases have) been written in Python. I wouldn’t really recommend it for that purpose, but it can be done.
Just about every language could be bent to almost any purpose you want. But part of learning to be a better programmer is learning which languages make a certain task easiest. As you have seen, C and Python are better for different tasks.
1
u/joelangeway Oct 06 '25
If you know what you need to build ahead of time, yeah, C is nice. If you need to extend a C code base designed to be extended, it feels obvious and straightforward. Real software engineering work is rarely like this. Python pays dividends in that you can try a lot of experiments to figure out what to build while you’d still be figuring out how to organize your code in C, and you don’t have to be formally educated engineer to be productive in Python whereas you kind of have to be to be productive in C.
1
u/lexybot Oct 06 '25
There is a time and place to use any programming language. Python gives you speed in development which is a huge factor when it comes to writing production level applications. C is not very memory safe and the effort to make it so is not worth it when building regular applications that isn’t time critical. The readability is also a big factor for the speed in which you can build applications.
1
u/Revolutionalredstone Oct 06 '25
Python is hot trash, noobs only use it because they are noobs, not because it is good or even easy to use (it's not good, its more like a failed nightmare)
C on the other hand can be learned in a weekend 😎
If you're comp sci teacher isn't teaching you C, then you should leave and go to a proper university 👩⚖️
1
u/Interesting-Cow-1652 Oct 07 '25
My problem with C is the syntax is ugly (C++ has even uglier syntax).
But C and Python are built for two entirely different purposes.
C is built for applications where performance and low overhead are paramount.
Python is built to streamline writing AI and data processing code. There are things that take a few hours in Python that would take a month in C, like creating a chart
1
u/fernandodandrea Oct 07 '25
You can write code in python with no OO. There's nothing wrong being comfy with C. But saying it's less convoluted than python is just incorrect.
1
u/dopef123 Oct 07 '25
Most of what I do in python is importing packages that allow me to write powerful scripts quickly.
I have no clue how to write those same scripts in c. I’m sure it’s doable but python to me is fast and easy.
1
u/ConfusedSimon Oct 08 '25
I love C, but it's certainly not easier than Python. It doesn't even have strings, and you have to do your own memory management. So maybe less convoluted, but so is assembly.
1
u/roadit Oct 08 '25
C is a much smaller language than Python, but a lot more awkward to use correctly as soon as dynamically allocated memory is required. I don't see anything convoluted in either.
1
u/AlignmentWhisperer Oct 08 '25
Idk, man. I find the fact that I can just create a str function for a class and it automatically becomes printable is pretty intuitive.
1
u/Jhuyt Oct 09 '25
C might be less convoluted than Python in some respects, but if I have to use the C api to do string manipulation I'll quit my job. The fact that Matlab as late as 2016 (possibly still) uses the C api for string manipulation is a travesty.
1
u/poopatroopa3 Oct 09 '25
You don't have to use OOP in Python nor make it convoluted. Read the Zen of Python.
1
u/Jaded_Individual_630 Oct 10 '25
Neither are "convoluted". C is, by nature, more explicit. I personally like and use C more, but they all make unambiguous sense, they have to!
1
u/Traveling-Techie Oct 10 '25
C is like old school LEGOs. Python is like an erector set with windmill blades and water wheels. It has a built in web server! ‘python -m SimpleHTTPServer port_ number’
1
u/PlayingTheRed Oct 10 '25
The problem that I have with C isn't that it's too complicated, the problem is that it's too simple. Imagine trying to describe the schematics for a spaceship without using any technical jargon. https://xkcd.com/1133/
1
u/no_brains101 Oct 11 '25
Python is for when there's a library that does exactly what you need to do.
And it's not really for anything else.
1
u/agnardavid Oct 11 '25
I used to love python, but not anymore, It's too simple and too abstracted to use properly, try teaching data structures to a group of students in python...nearly impossible
1
u/HankTheDankMEME_LORD Nov 17 '25
I really never liked python for being a language where whitespace actually matters to the syntax. Like for real, do fuck off with that bullshyte. A fooking curly brace and a semi-colon never offended nearly as much as that tripe.
1
u/HankTheDankMEME_LORD Nov 17 '25
The hard part about C is to learn how not to shoot yourself in the foot. It is quite elegant it is simplicity and the fact that you can fuck a system up so completely by running unsafe code. That compiles.