← Back to context

Comment by tialaramex

2 hours ago

> In my opinion, it seems easier to complement the former to catch issues afterwards (like this article)

Fil-C of course can't magically fix your incorrect program. It never had any defined meaning, but the compiled executable does something and Fil-C will ensure that if the thing it does involves say, a use-after-free at runtime now it exits reporting the error, but it can't fix the fact it's nonsense, that's not their purview.

There's no point in hoping that somehow Programming Languages will overturn Mathematics. I mean, I can't blame you for trying, Bjarne Stroustrup is a professor and still seems to think that should be attempted, but it's futile. We're definitely talking "Why can't I extinguish the sun with water?" level thinking.

Obviously I can't speak to your own experience but for me certainly Rust is easier than C++.

> There's no point in hoping that somehow Programming Languages will overturn Mathematics.

Maybe you misunderstood my point?

Getting rust to a more complete state would be overturning mathematics here, as you note you can’t have both soundness and completeness.

What I say does not require overturning mathematics, ie allow unsound programs to compile but have different methods of catching them, both statically or dynamically.

  • Rice's Theorem says we can advance arbitrarily close but can't reach the goal of compiling exactly the set of correct programs (all correct, none incorrect). Some years ago Rust landed "Non-lexical lifetimes" borrow checking which is an example of such an advance, you don't need to overturn mathematics to make such advances, only to reach the goal. Work to further improve lifetime checking is ongoing though I doubt anything as big as NLL is on the foreseeable horizon.

    The problem isn't directly with C++ choosing "All correct programs compile" but instead with the resulting incentive structure. Programmers want their program to compile.

    In Rust the incentive is to improve the compiler, allowing more programs (all of them correct) to compile as with the NLL changes.

    But in C++ the incentive is to loosen the requirements, allowing more programs (some of them incorrect) to compile, as with Concepts Lite in 2020.