News for hackers. Stuff that matters.
Re:Worse Is Better (2001) by lordgrenville on Sunday July 25, 2021 @01:59PM (#27951368)
> the absolutely immense numbers of bugs and security vulnerabilities directly due to C

Isn't this simply a result of the absolutely immense amount of C being used in critical systems? Are functional languages empirically more secure?

Re:Worse Is Better (2001) by chillpenguin on Sunday July 25, 2021 @02:40PM (#27951727)
The immense number of C bugs is not merely due to C's popularity. Other languages lead to less buggy and more secure code.

This is largely due to memory safety. However, immutability is also known to reduce bugs and be more secure (as many security related bugs are due to mutability). Lastly, superior concurrency constructs also have this bug-reducing effect.

That said I haven't looked into empirical studies. But I feel like it is just factually the case, at least for memory safety, that in most other languages you literally are unable to create entire classes of bugs that are possible in C. So just logically thinking about it, I don't even see why you'd need to see empirical studies. It should be quite obvious!

Although it'd be cool to see the empirical research too! Maybe someone else can reply with links to studies.

Re:Worse Is Better (2001) by mpweiher on Sunday July 25, 2021 @04:30PM (#27952650)
> But I feel like it is just factually the case,

Aka truthiness. [1]

Or when this is asserted for safety, safyness. [2]

[1] https://en.wikipedia.org/wiki/Truthiness

[2] https://blog.metaobject.com/2014/06/the-safyness-of-static-t...

Re:Worse Is Better (2001) by tikhonj on Sunday July 25, 2021 @04:37PM (#27952703)
Memory safety is literally the only relevant topic in this whole thread whose impact isn't "truthy" in that sense! We can measure how many bugs and security vulnerabilities in real projects are memory issues, and we know that a memory safe language would rule those bugs out by construction.

And we have! This blog post[1] is a good starting point, linking to a number of studies. Empirical evidence is never perfect, but that's much stronger evidence than we have for the impact of pretty much any other aspect of a programming languages!

[1]: https://alexgaynor.net/2020/may/27/science-on-memory-unsafet...

Re:Worse Is Better (2001) by samatman on Sunday July 25, 2021 @08:10PM (#27954140)
Your mistake was taking @chillpenguin at their word when they said "I feel". That was just a hedge, it is factually the case that memory safety eliminates an entire class of bugs. More accurately, it pushes them down to the garbage collector and runtime, where they can be epsilon close to eliminated, instead of rolling fresh ones in each and every program.