Hacker News new | ask | show | jobs
by idiotsecant 106 days ago
How does a programming language prevent the vast majority of bugs? I feel like we would all be using that language!
3 comments

See Rust with Use-after-Free, fearless concurrency, etc.

My language is a step ahead of Rust, but not as strict as Ada, while being easier to read than Swift (especially where concurrency is involved).

And whenever someone tells you to lookup "Fearless concurrency", replace it internally with "Locking concurrency". Thanks to the Rust marketing department
When you combine that with guaranteed lock elision when you're doing things as expected, it's not a problem.
I agree with your questioning of it being capable of preventing bugs, but your second point is quite likely false -- we have developed a bunch of very useful abstractions in "research" languages 50 years ago, only to re-discover them today (no null, algebraic data types, pattern matching, etc).
How? That's easy. You just need a huge dollop of hubris.