D mixins

mike vertex at gmx.at
Fri Jan 5 07:37:16 PST 2007


Am 05.01.2007, 04:28 Uhr, schrieb Chris Nicholson-Sauls  
<ibisbasenji at gmail.com>:

> Sadly, no, you cannot do that, because templates (perhaps mixins should  
> be their own type?   er, nevermind that) have their own evaluation  
> scope, with the outer scope "friended" in.   So, scope guards will  
> execute on the templates's own scope rather than the host's.  I've  
> actually tried this, with my fingers crossed.  All to no avail.  (It  
> would've been a darn nifty way to do selective tracebacks.  But alas.)
>
> -- Chris Nicholson-Sauls

I wanted to do tracing this way as well (see my other reply). I've  
actually started to go through all my code and copy/paste the scopeguards  
at the beginning of each function. But, mixin or not, it's just too much  
to insert those statement in 30k or so lines of code, I'll rather just try  
out if the modified phobos that was linked to a couple of times here in  
the ng works with 1.0 :)

-mike

-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list