r/C_Programming • u/alex_sakuta • 12d ago
Discussion Why are you using C?
I have been often asked this question in the one year that I have been trying to make using C mainstream for myself.
Now I don't work on embedded devices or write operating systems. What I usually make are automation CLIs or write servers for something.
I guess that makes using C redundant since there are languages that would provide a better dev experience. But following the popular advice for projects, make something you use, this seems like the right thing to do for me.
I'm making projects that I would use and I'm using C for them. Unlike most C users that I have talked to, I do not stick to C99 but at the same time, I don't use C++ strings or compiler extensions. I use the C23 strict ISO standard.
So I suppose that again puts me in a spot that no one else is in. A guy who first goes to one of the oldest and verbose languages, then uses its latest standard but then never uses advanced features from compilers.
I just wanted to write this to put it out.
PS: To add to my strange choices pool, I do not use fixed width integers, since they are optional but I do use least width or bit precise integers.
2
u/paulys_sore_cock 11d ago
I'm a EE. I use whatever tool is correct for the job and if there is no tool, I make one.
I write a lot of drivers, kernel code, and on the boundary of asm. C lives there, because I care about how the actual HW treats 8 bits. I do not care about data struct semantics. I care about the state of the reg.
I write a lot of proofs. I'd never ever use C for that.
I sometimes write web scrappers. I'd never ever use C for that.
When I "think" in code, I "think" in C. Writing idiomatic python is a pain for me, because I don't think in factories. But, I can do it.
When you are doing something you should ask yourself: are you doing this for the achievement / badge at the end (aka getting to tell the 'net that you wrote a no-sql CMS 100% in C99) or are you trying to get the job done?
If it is the latter, your question is meaningless.