A Perspective on D from game industry
Nick Sabalausky via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 16 22:36:21 PDT 2014
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/
More information about the Digitalmars-d
mailing list