News for hackers. Stuff that matters.
Re:The cost of forsaking C by retro64 on Wednesday October 05, 2016 @11:17AM (#12644534)
I have been coding in straight C lately on an embedded personal project and have loved it immensely. I know what is going on and have a good shot at predicting the resulting assembly.

However, for me, C falls down on large projects. I know there a lot of hate on objects lately, but the complexity of a project decreases while the maintainability increases when you use properly designed interfaces. You “force” the new guy to do it right because the interface makes it obvious. I know there are ways to enforce encapsulation with C, but I’ve never worked on a (large) codebase where this has been successful.

Re:The cost of forsaking C by Keyframe on Wednesday October 05, 2016 @11:43AM (#12644818)
Objects are in C as well, with structures. You can do abstraction like that in different ways in comparison to classes. For example, components are common. Difference being that objects are components, but not all components are objects. Also function objects, aka functors.

I try to organize into specific components and piece them together into a sequential or threaded or both model, depending on what I do. Of course, it is specific to what I do. But there are large C projects that are successful - for example, Linux kernel.

Re:The cost of forsaking C by pjmlp on Thursday October 06, 2016 @03:03AM (#12650716)
And yet, in spite of all code reviews, they just got an use after free exploit this week and the CVE database is full of exploits due to memory corruption.