On 2013-11-11 11:39, Timothee Cour wrote:
yes, I think your initial example becomes more interesting with this, as in its current form it can already be done in current D.
The current example prints out the exact expression what was passed to the assert macro. Not the result of evaluating the expression. I don't see how this can currently be done in D
This would make error messages self-documenting: myAssert(!file.exists ); // "!file. exists" failed: dump of AST: file: string ="foobar.d" |_file.exists: bool = false |_!file. exists: bool = false In many cases, this would be so much more useful than an out of date / incomplete string error message, esp w a lot of variables involved.
I agree. -- /Jacob Carlborg
