Another idiom I wish were gone from phobos/druntime

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 5 08:00:04 PST 2015


"Andrei Alexandrescu"  wrote in message 
news:mb03nt$1lhr$1 at digitalmars.com...

> I agree. One actionable - albeit crazy :o) - idea is to make __FILE__, 
> __LINE__, __MODULE__ etc. inside contracts bind to the caller context. 
> Then all failures blame straight to the caller code. -- Andrei

Unfortunately that's not practical until contracts have been changed to run 
from the caller's side, as there is no way to pass them through the called 
function without modifying its argument list.  #3799 does however report the 
caller's location correctly. 



More information about the Digitalmars-d mailing list