Another idiom I wish were gone from phobos/druntime
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 5 01:53:37 PST 2015
"Meta" wrote in message news:etibhdbtswksyksznfxv at forum.dlang.org...
> I have seen that PR previously, and I do hope it gets merged. It is a step
> in the right direction; contracts may turn out to be a veritable goldmine
> of opportunities from optimization, such as Walter's desire to have
> assert() also mean assume(). Using contracts for optimization purposes is
> really a win-win, as it would make contract-based code both more correct
> AND faster. I think the best way to evangelize DbC is not that it's the
> correct thing to do, but because it makes code faster. That's obviously
> not the case with D yet, but I hope we get there someday.
Yes, optimization is another nice possibility. I think there is a lot of
untapped potential in using contracts to pass extra information to the
compiler.
More information about the Digitalmars-d
mailing list