Is this normal?

CT_Biker

Expert Member
Joined
Sep 10, 2016
Messages
2,925
Reaction score
1,824
Location
Cape Town
As of late I have been rewriting a lot of Code in C, as I am more often than not either not interested in writing Python any longer or I am bored while writing code.

I am REALLY enjoying C/C++ is there any reason for this? I find the language easy to read, fun, I like how strict it is the only thing that sucks are compile errors, run errors, and the amount of code I have to write.

However, the code I do write is more brief, and easier for others to understand.

Is this a normal experience or am I mad?
 
Well, C is in terms of the actual language (not necessarily external APIs), is probably the simplest main stream language.

What you are probably experiencing is that you know how how just about everything works and how straight forward it is.

The newer languages (C++ included), layer on so much syntax, multitudes of approaches and implicit behavior that coding can become a chore and understanding the mechanisms, motivations and applicability of all the language features requires years of experience, making them frustrating for beginners.
 
I don't agree with any premise that C's syntactic simplicity makes it easier for beginners than other more syntactically complex languages. C although strongly typed, is a bit like a hair trigger pistol; its just so easy to shoot yourself in the foot; with code that has cryptic side effects that's difficult to diagnose.

Constrast this to newer system languages like Rust and Swift where that type of code has been syntactically ringfenced as unsafe to avoid confusion.

I'm however not saying that this makes Rust and Swift syntactically simpler than C; they're definitely not, but it's also important to understand why these languages are so much more syntactically complex; it certainly wasn't done to make a programmer's life more difficult; in constrast it was done to alleviate many of the problems inherent with low level abstractions. Adding syntax for example that makes its easier to reason about code at a much higher level of abstraction; results in not only less code, but also code that is far easier to write, test, and maintain.
 
Last edited:
I kind of enjoy pure C lately as well. It forces you to be more careful, and I find that a bit refreshing. You also don't have as much hand-holding.

Python is great for a number of things, but I was running too much into its limitations lately. I've taken a slight step back in productivity in C because it's not as easy to slap something together, but I feel that the quality of my code is better as a result.
 
When I programmed C back in the days of DOS, the difficulty in learning to program in C depended on whether your PC's reset button was on the back or the front of the PC...
 
What I like about C is the "I cannot do too much" I cannot over code, even though I writing more lines of code per function etc etc.

This is something I battle with when I use something like Python, I often get bogged down in the amount of modules I need to import and apply in order to actually achieve something usable, so as Cguy pointed out, knowing where everything is, is a plus for me.

Python as great as it is, it is both really vast, and quite limited in the exact same breath. I normally do web development in Python, as great as it is, pure Javascript would be easier and far better to use.

The big take home for regarding C and maybe programming languages as a whole would be "What You Is What You Get" C has been encouraging me to think twice about the way I implement an algorithm and specifically how i manage its interactions with other functions where need be, and I tend to focus on not repeating myself, and to stop relying on boilerplate code - which will come in hand as I migrate my web dev toolset over to JS and ES6.

I am not sure if anyone else thinks this too, but even even though we have moved away from Monolithic programs to microservices and server less environments, I am starting to become annoyed with languages that do too much and rely on too many libraries and outside repositories in order to get the job done - for someone as young as me to not be 'into' a programming language that 'does it all' is weird, but I would rather be working with more than one programming language which can be applied to its environment easily. Like for web: JS/ES6, Android, Kotlin and what accompanies that, iOS with Swift(maybe Obj C), need a few scripts for server side or Linux, use good ol' BASH or even Perl.

Yeah, analysis paralysis
 
What I like about C is the "I cannot do too much" I cannot over code, even though I writing more lines of code per function etc etc.
This is far more related to experience than a language.

This is something I battle with when I use something like Python, I often get bogged down in the amount of modules I need to import and apply in order to actually achieve something usable, so as Cguy pointed out, knowing where everything is, is a plus for me.

Python as great as it is, it is both really vast, and quite limited in the exact same breath. I normally do web development in Python, as great as it is, pure Javascript would be easier and far better to use.
Strange that you reason that Javascript is "easier and far better to use" wrt to being "bogged down" with the "amount of modules", when most Javascript frameworks are orders of magnitude more bogged with modules than Python. For the most part this is just a consequence of initial language development, e.g. glaring feature gaps in the standard libraries.

Plus it's not as if #include is such a rarety in C.

The big take home for regarding C and maybe programming languages as a whole would be "What You Is What You Get" C has been encouraging me to think twice about the way I implement an algorithm and specifically how i manage its interactions with other functions where need be, and I tend to focus on not repeating myself, and to stop relying on boilerplate code - which will come in hand as I migrate my web dev toolset over to JS and ES6.
Languages are just a tool; the "what you get" is always going to be down to the abilities of the developer wielding that tool.
 
Top
Sign up to the MyBroadband newsletter
X