assume, assert, enforce, @safe

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 30 20:52:37 PDT 2014


On 7/30/14, 6:15 PM, Dicebot wrote:
> On Wednesday, 30 July 2014 at 22:01:23 UTC, Walter Bright wrote:
>> I am not terribly good at writing formal legalese specifications for
>> this. I welcome PR's to improve the specification along these lines,
>> if you find any Aha! Gotcha! issues in it. Of course, implementation
>> errors for this in DMD should be reported on bugzilla.
>
> What is missing is not formal specification but clear guidelines "how to
> use this system in production". Right now it is pretty clear that you
> have implemented something that non-zero amount of experienced D
> developers have no clue how to use without botching the application
> completely. This does indicate that something is wrong with the feature
> even you are perfectly right theoretically.
>
> Currently there is http://dlang.org/contracts.html but neither it nor
> any of referenced materials does explain to me:
>
> - how to distribute binary library packages in presence of contracts
> - how to organize your application to ensure that contracts can be
> removed in release builds
> - are those even applicable to majority of applications
>
> I am less concerned with just assert behavior because there are many
> ways to workaround it to get different semantics. But contract system...
> no clues.

It would be awesome if you (a) documented formally the current behavior 
and (b) submit bug reports wherever you find egregious faults in it. -- 
Andrei


More information about the Digitalmars-d mailing list