5 ms·
Yes, blame the language.
by trhway 12y ago
Yes, blame the language.
- nawitus 12y agoWe can either blame the language and change it, or we can blame humans and change them. I think the former is a bit more realistic.
- ddingus 12y agoOr we can help the humans improve.
- anon1385 12y agoYou say that as if we even know what kind of human it would take to write safe C code. No specimen has yet been found.
- ddingus 12y agoHelping the humans improve means better tools, education, etc... and this isn't a binary thing, in that compartmentalizing it into the people or the language ignores the cost of rewrites and the use / reuse value of all the code bodies out there right now. Dismissing this simply isn't practical. Augmenting C with things designed to work well with it can cut down on the use cases where C gets used and people aren't well equipped to do it. Great! That's improving the people while not stepping away from a massive investment and it's use value.
- Retra 12y agoThen they die and you have to start over again. Humans haven't improved in at least 20,000 years.
- seanwilson 12y agoIt's not realistic in my opinion. Your web server and operating system for example will be built on a huge amount of C source code written by a huge amount of people; it's just not realistic to expect everyone to be careful enough that there's no buffer overflows in there.
- ddingus 12y agoWell, we've peaked on CPU performance, single threaded right now. Little tiny gains, but nothing like going from 1 to 3 and now just a shade over 4Ghz. (fastest single threaded x86 I could find recently) Double that, and maybe we really can step away from things.
- rossng 12y agoWhy not blame the language? There are plenty of languages available that are objectively more safe than C. Most of the security-critical memory-related bugs that are written in C (and C++) simply could not happen in, say, Java or Haskell. By contrast, even though it is technically possible to write safe C, it is mind-bogglingly hard. The problem is too difficult to be solved even by automated static analysis, testing and fuzzing. The reason those safe languages aren't used pretty much always boils down to either a) legacy or b) performance. Rust solves the latter, but the former is nigh intractable. Simply expecting programmers to be better or more careful is not a viable solution. The aviation industry knows this - problems can almost always be attributed to a systemic cause, not the one-off mistake of an individual. Problems are fixed by making those mistakes impossible, not by reminding people not to do that, crossing your fingers and hoping for the best. This attitude is spreading to other industries - primarily healthcare[1]. In the light of the ever-growing digital security threat, I think we should be making the same kind of efforts in software engineering. C has its niche, but I think it is important to recognise that it has its tradeoffs. We should be trying to make things better. [1] http://www.amednews.com/article/20100614/profession/306149945/4/ http://www.amednews.com/article/20100614/profession/30614994...
- seanwilson 12y agoExactly, if a language makes a mistake virtually impossible to make, why would you not want to take advantage of that? If there's even a small chance you can make a mistake, it's inevitably going to happen given a large enough project. For issues like security it's not scalable to just "be careful". Also, as a programmer, I like to automate tedious problems away. I don't understand why a programmer wouldn't want to automate away such a enormously important issue.
- xamuel 12y agoIt's a real dilemma. Sure, the safeguards make your code 5% less performant; who cares, right? Now suppose your code has a dependency, which has a dependency, which has a dependency, which has a dependency. And each level introduces a 5% performance hit. Suddenly your product is 28% less performant. This is why you end up with such nonsensical things as, e.g., the OWL API needing 2 gigabytes of RAM to hold an ontology that should take 200 megabytes max.
- borplk 12y agoOh how dare we humans are so imperfect eh? We should crack the whip until those bastards learn to prevent their buffer overflows. Your attitude takes us nowhere. Yes, blame the language because that's what makes things improve. Computers need to adapt to us, no the other way around.