Remix.run Logo
▲ bluGill an hour ago

What does guaranteed enforcement mean? Is it worth the trade-offs? There's a reason why most code turns assert off in production and only does it in debug builds. A lot of checks are certainly possible to run, but they're unreasonably expensive to run and so if the code is trusted to work, you wouldn't want to check that it's working correctly.

If, on the other hand, you mean only that, regardless of the status of a contract, if the compiler can detect that it would be violated, it must have failed to compile, I guess that would be all for that. On the other hand, the state of theorem provers that are able to prove things will and won't work is ... evolving. There will a lot of people be frustrated when they upgrade their compiler to a minor point release and suddenly a lot of code fails to compile because it always was broken but likely in an obscure situation that never happens in the real world.