On 6/17/2014 12:32 AM, H. S. Teoh via Digitalmars-d wrote:

I do agree, though, that D's string mixins eliminated a whole class of
cpp abuses by requiring that the input string be a set of complete
statements or declarations -- things like:

        mixin("writeln(");
        mixin(");");

are rejected by the compiler, whereas in C:

        #define MIXIN_1 writeln(
        #define MIXIN_2 );

        MIXIN_1 MIXIN_2

are happily accepted

OTOH, this does make it harder for D to emulate the nifty "stackless fibers" trick used by C's sweet ProtoThreads library (The one thing I'm envious of C over): http://dunkels.com/adam/pt/

Reply via email to