165 karma · joined September 27, 2013
There is no silver bullet here. If one takes into account all the sources of bugs, C may very well be the best choice given its maturity and its ecosystem. Our best bet is likely to put more resources towards glibc development and especially fuzz testing. I bet there are only 1-2 developers who work on glibc full-time.
Violence among humans is only one of many metrics to gauge the state of the world. Other metrics show trends that are not as rosy. Let's not forget, for example, that we are in the middle of the sixth mass extinction event, exhibiting a rate of species extinction 10x greater than during any other extinction event.
If we especially ignore our anthropocentric biases one can make a convincing case that the world is falling apart.
And a large part of why housing costs $400,000 in the first place is due to the availability of mortgages. Mortgages gave themselves a reason to exist.
High enough that the firms are at least receiving a normal profit. And given the opportunity cost that all these smart people incur by working in this industry, this normal profit is rather big, and no doubt that the extraction of this normal profit has non-neglible deleterious effects on the economy.
The statement
puts ("hello");
is a "pure" value of type int.I disagree with your implicit claim that C's position as the most popular systems programming language is not due the language's intrinsic qualities. Luck was a factor but not the only one. It cannot be the only one. The language is just good -- or at least good enough.
> It is nothing more than a portable macro assembler with all advantages and more importantly the disadvantages that it entails.
Stop the hyperbole. The language is quite a bit more than that. For one, it's structured.
The most popular language in the world -- the language that's being used to write the largest, most complex software -- will surely have a rich history of bugs and security holes. That will be the case whether or not said language is C.
I think most of the advantages of FP languages (as they exist today) become disadvantages as your data structures get more and more complex. Efficient mutability becomes necessary. Pattern matching breaks down as (G)ADTs can no longer encode useful invariants. Referential transparency becomes useless once you realize you want explicit sharing. Laziness and space leaks become a huge PITA. The RTS and the mandatory GC start getting in your way as it gets harder and harder to eek out performance from your code. etc etc..
asm ("" : : "m" (&key));
just before or after the memset, effectively telling the compiler that the address of "key" escapes the scope of the function.