Another idiom I wish were gone from phobos/druntime
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Wed Feb 4 21:48:41 PST 2015
Zach the Mystic:
> I have an idea. Treat all assert statements which come before
> the first non-assert statement as part of the 'in' contract.
> I'm not saying the compiler has to generate a whole 'in'
> function, but these asserts can be internally tagged to behave
> *as if* in an 'in' contract. That solves the tooling problem
> and the too-much-code problem, no?
Bad idea. We had DbC, let's start using it.
Bye,
bearophile
More information about the Digitalmars-d
mailing list