Another idiom I wish were gone from phobos/druntime
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 5 03:06:43 PST 2015
"Jonathan M Davis via Digitalmars-d" wrote in message
news:mailman.6026.1423131941.9932.digitalmars-d at puremagic.com...
> Well, if we can change it so that whether the contracts are run or not is
> determined by the caller and not the callee, then using them would
> definitely be worth it. But as long as that's not the case, it's not at
> all
> worth the visual noise IMHO to use in and out blocks IMHO. And if/once we
> change it so that whether the in and out blocks are run is determined by
> the
> caller, the visual noise will still be annoying enough to make it so that
> I
> won't be in a hurry to add them unless they're adding real value rather
> than
> just some additional, nice-to-have checks.
I agree, and that's a big part of why I opened that pull request. The idea
of contracts is nice but we need some real tangible benefits from them to
encourage their use.
More information about the Digitalmars-d
mailing list