DMD 0.165 release

Tom S h3r3tic at remove.mat.uni.torun.pl
Mon Aug 21 00:51:32 PDT 2006


Unknown W. Brackets wrote:
> Hmmm... what does the last example about Enforce have to do with lazy 
> evaluation?
> 
> It seems like a nice idea, etc., but I can actually run it already 
> without upgrading to 0.165.....?
> 
> Does really sound nice, though :).


See my second reply to this thread... the point is that 'msg' should be 
char[] delegate(). Then you can supply an expression to Enforce, e.g.
Enforce(a == b, toString(a) ~ " != " ~ toString(b));
and it will only be evaluated in the case when a != b, thus making your 
code faster.


--
Tomasz Stachowiak



More information about the Digitalmars-d-announce mailing list