D enters Tiobe top 20
timon.gehr at gmx.ch
Sun Nov 10 10:22:27 UTC 2019
On 10.11.19 00:23, Walter Bright wrote:
> On 11/9/2019 4:23 AM, Timon Gehr wrote:
>> You need in and out contracts for modular verification.
> You can pick up both from looking at the assert's in the prolog and
> epilog of the function.
- Modular verification means it's enough to have DI files for functions
you call, without a function body.
- Some asserts in the prologue of your function might really be asserts
and not assumes.
- Similarly, some asserts in the epilogue of your function might not be
things you actually want to guarantee to the caller.
> More importantly, nobody is working on a modular verification system for
> D, and haven't for 20 years, so the contracts aren't particularly useful.
Programmers can read contracts too, not just verification systems. They
are useful documentation and can be used for assigning blame: Is the
assertion failure the fault of the caller or the callee?
More information about the Digitalmars-d