Another idiom I wish were gone from phobos/druntime
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Wed Feb 4 22:42:11 PST 2015
"Meta" wrote in message news:ejqtxksoifmqzetllaqw at forum.dlang.org...
> I don't know about others (besides Beatophile, who religiously adheres to
> writing contacts), but putting contracts on functions is a hassle. I never
> do it unless I'm feeling particularly full of divine fervor. It's a lot
> like making all variables that don't need to be changed immutable (another
> thing which only Bearophile seems to do) or properly documenting code.
> Strong optimization guarantees from contracts would go a long way in
> convincing people to actually write them (although I guess that's not what
> you want; Perhaps you changed your mind). It's a chicken and egg problem.
Would you be more likely to write contracts if something like this was
implemented?
https://github.com/D-Programming-Language/dmd/pull/3799
I want to check contracts at compile time, when possible. For me this would
make contracts 1000x more useful.
More information about the Digitalmars-d
mailing list