Ranges
robert fraser
fraserofthenight at gmail.com
Thu Jun 18 14:38:04 PDT 2009
grauzone Wrote:
> Your example doesn't compile right now.
The "@@@" was meant as an example to be replaced with any code. Yeah, you probably knew that.
> But if you use a string mixin,
> the code doesn't even have to be syntactically/lexically valid:
>
> is(typeof({ mixin("@@@"); }))
True -- both these features (string mixins and is-expressions) are rife with pitfalls. But they're both very useful features (if you get rid of string mixins, 25% of my code will stop compiling...). Silent compilation is dangerous indeed, but also very powerful.
I was just suggesting we need a better syntax, but I realized we have one: __traits(compiles). Why Andrei isn't using this is the real mystery.
More information about the Digitalmars-d
mailing list