"If we'd written all of our Internet software and operating systems in Haskell or maybe in OCaml or ML..."
š¤£š¤£š¤£ š¤”š
@ryanlpetermanCo-creator of Haskell on why C is a dangerous language
Simon: In C, you program by mutation. So it's unsafe in the sense that any function can mutate any variable at any time. It has a lot.
You pass pointers around a lot, and functions mutate the memory pointed to by those pointers. And moreover, typically they can mutate it anywhere. There's no array bounds checks or anything.
So it's kind of like super unsafe. And in fact, and this is demonstrated by the fact, can you imagine all of these exploits that we get every day, right, that Mythos is discovering in huge numbers? But why is the Internet so insecure?
Primarily because all of our software infrastructure is written in unsafe languages. If we'd written all of our Internet software and operating systems in Haskell or maybe in OCaml or ML, 99% of all these exploits would be removed by construction.
It's like we've built a boat out of paperclips and we're surprised that it's leaky. You shouldn't build boats out of paperclips, right, because they have holes in them. You should build it out of a secure substance, right?
But then it's too late. So we spend incredible amounts of human ingenuity and effort patching the holes in our boat built of paperclips. It's tragic.