[D.typesystem] Static (CT) enforce anybody?
Justin Johansson
no at spam.com
Wed Sep 1 06:03:39 PDT 2010
IIRC std.contracts has been deprecated and replaced by std.exception,
enforce and friends. The latter are runtime things, correct(?).
Is there a valid use case for compile-time (i.e. subject to static
analysis) design-by-contract (DBC) enforce-like machinery?
For example, and perhaps not the best example, one might like to pass
an array of Foos to a function which by static design expects to
receive such array at runtime as containing a minimum and/or maximum of
elements. Should (i.e. could it be desirable that) such interface
contracts be checkable at compile-time?
Cheers
Justin Johansson
More information about the Digitalmars-d
mailing list