Re:The cost of forsaking C
by KKKKkkkk1 on Wednesday October 05, 2016 @09:30AM
(#12643592)
I love C with all my heart, but minimal in the syntactic sugar department it ain't. Other languages of its day like Fortran or Pascal would not let you write an atrocity like
[ Parent
| on HN ]
Clear and concise, and a thing of beauty!
Unless the data is user-generated, in which case you might have a security issue on your hands... :)
Well, that's up to you whether you write that way or not.
Kinda like with everything else related to C!
> Well, that's up to you whether you write that way or not.
The problem is, it's also up to the programmers who worked on my codebase before I did. I would never write that atrocity, but I've come across that atrocity quite a few times in code I needed to modify.
I'll.never claim there aren't a ton of terrible coders out there. They exist in all languages, but perhapd C gives them the tools to be really, extra awful..
It also doesn't give you very good tools for refactoring to clean up the awfulness. Unit testing tools and the type system in C are such that it's fairly difficult to ensure that your refactor hasn't broken anything.
Re:The cost of forsaking C
by jjaredsimpson on Wednesday October 05, 2016 @10:01AM
(#12643844)
Not really an atrocity. More like an idiom.