DIP 1009--Improve Contract Usability--Preliminary Review Round 1

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 21 08:18:21 PDT 2017


On 21.06.2017 02:51, MysticZach wrote:
> 
> I think people could get used to the cognitive dissonance.

That's really not what D is about.

> I've already gotten used to it just by writing this DIP.

I think it is likely that you are an outlier.

> If such an alternative checking system is utilized,

If so, there should be a way to hook into the checking logic. This has 
nothing at all to do with contract syntax. asserts and contracts are 
coupled already, as in-contracts form a disjunction on override by 
catching AssertErrors.

> the syntax for  writing contracts should be as easy
> for them as for those using `assert`. 

Maybe, but your DIP does not pull its own weight as long as the latter 
syntax is not a notable improvement over what we have now. H. S. Teoh's 
counter-proposal is, and I think your DIP has a much higher chance of 
acceptance if you go with it.


More information about the Digitalmars-d mailing list