Could assertThrown be made safe/trusted?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jan 17 14:14:36 PST 2012


On Tue, Jan 17, 2012 at 05:04:18PM -0500, Jonathan M Davis wrote:
[...]
> Attribute inferrence is a big step forward in making as much as
> possible @safe and pure, but there's still plenty to do there.
[...]

Funny you should mention that, I was just starting to wonder if I should
start littering my code with 'pure', and whether it's possible to make
the compiler infer it for me. From the little that I know, it seems that
in most cases 'pure' can be automatically inferred. The compiler already
distinguishes between weakly pure and strongly pure internally, so why
not take it all the way? Not sure how this will affect inter-module
analysis, though.

But since this is apparently not yet implemented, just what *is*
implemented currently when you specify 'pure'?  Common subexpression
factorization? Hoisting? Not (yet) memoization, apparently.


T

-- 
There's light at the end of the tunnel. It's the oncoming train.


More information about the Digitalmars-d-learn mailing list