Future of contract-based programming in D

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 8 16:05:18 PDT 2015


On Wednesday, 8 April 2015 at 11:26:38 UTC, Kagamin wrote:
> On Tuesday, 7 April 2015 at 12:51:45 UTC, Delirius wrote:
>> I read a thread here where he wrote you should get rid of 
>> those in/out contracts and replace them with assert()s in the 
>> function body.
>
> That was only because contracts with Allman style increase line 
> count.
>
> BTW, what do you think about this problem: 
> http://forum.dlang.org/post/cokicokwqnscaktxifze@forum.dlang.org 
> ?

The usual way to resolve this would be to make (part of) the in 
contract a polymorphic function of the parent class.


More information about the Digitalmars-d mailing list