Steven Schveighoffer Wrote: [...] > Hold on, can't we have enforce and lenforce (lazy enforce)?
Or couldn't we have an overload for enforce that takes a string, and another overload that takes a void delegate returning a string? It makes the syntax a little grottier, but... > From a simple grep, 99% of enforce instances are: > enforce(condition) > -or- > enforce(condition, "compile-time-string") > -or- > enforce(condition, "compile-time-string" ~ type.stringof) ...if you have to write enforce(condition, (){ return "compile-time-string" ~ type.stringof; }); one time in a hundred, is it really that bad? Cheers, Pillsy