Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Thread beginning with comment 548410
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:

It's fine understanding how the OO features work on a low level. I'm not sure I'd say people *need* to know this to be decent programmers, but I'm personally fond of my background in C and assembly.

But, after learning how to do things at a low level, why would you continue writing code in that tedious and painful way, when there's tools better suited for the job?

Reply Parent Score: 3

rom508 Member since:

Because it's not tedious and painful, the overhead of manually doing basic OO development in C is not very big. It would be tedious and painful to use C++ instead, because I don't have as much experience with C++.

Reply Parent Score: 1

f0dder Member since:

Hm, fair enough point wrt. the experience (you're never too old to learn something new, though! ;) ) - but I'd still say the manual work is tedious... otherwise C++ would probably not have been invented? (Keep in mind that the early versions translated to C - you're doing a compiler's job).

I personally also enjoy the higher type safety and a bunch of C++ features (RAII!) and some libc++ things. Even if not doing OOP as such, I wouldn't be using C, I'd be using C++ as a Super-C (and I'd even argue that it's not necessarily a bad idea for kernel mode work, though you definitely would be using a restricted feature set of C++ there).

Personal preference and experience are some pretty big factors. I've played around with quite a lot of features by now (nowhere near proficient in all of them!). Most of them are in the comfort zone of C-like (javascript, python, LUA, C# and Scala do offer some alternative ideas though, and even a bit of FP mindset).

But C++, for some reason, has a special place for me. Probably because (especially with C++11!) it lets me program in a lot of different styles, while still offering kick-ass performance and being relatively safe - and RAII really is nice compared to garbage collection.

Not saying it's the end-all-be-all of languages, I believe in the right tool for the right job... I just have a hard time seeing why you'd use plain C, when you could do procedural programming with C++ :-)

Reply Parent Score: 3