DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

Timon Gehr timon.gehr at gmx.ch
Sat Jun 15 14:49:49 PDT 2013


On 06/14/2013 11:03 AM, bearophile wrote:
> Don:
>
>> I don't think contracts can be much use to a static analyzer if they
>> can contain arbitrary code.
>
> The other contract systems I know of (Eiffel, Ada, C#, Sing#), plus few
> other systems that use the type system for similar reasons (Liquid
> Haskell, etc), use a very restricted expression language to state
> contracts. D is the only that uses free form D code.
>

Eiffel can call arbitrary methods in contracts.

> I presented this problem to Walter lot of time ago in a post. He
> answered me that analysing a loop is not harder than analysing the
> all/any/exists used in those systems. I was never convinced by that.
>
> I still think there's one D design problem here.
>...

I disagree. The only problem is the verboseness of the contract system.



More information about the Digitalmars-d-announce mailing list