Internal and external iteration, fibers

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jan 23 13:50:39 PST 2013


On 1/23/13 3:29 PM, Jacob Carlborg wrote:
> On 2013-01-23 08:57, Andrei Alexandrescu wrote:
>
>> I completely disagree. (Sorry to foul you twice.) All AST macro systems
>> I've studied are considerably difficult to understand and use
>> effectively. By comparison, string macros are brutal and unstructured
>> but the kind of thing all programmer worth their salt can get done.
>
> I was talking about functions running at compile time. In D that's
> handled by an interpreter which doesn't support the full language.

It's a subset. That's a better thing than _another_ language.

> It
> also behaves differently from the "regular" language.

To the smallest extent possible.

> Bugs occur in the
> CTFE interpreter which doesn't occur in the regular compiler.

Not an argument.

> In Scala it _is_ the regular compiler that handles both the CTFE and the
> regular code. A bug in the regular compiler will show up during CTFE as
> well.

Agreed this is a good thing for Scala, it takes advantage of the jit 
infrastructure.

> BTW, how do you make a string mixin hygienic?

By passing fresh names as arguments into the function creating it. We 
don't have a strong story there.


Andrei


More information about the Digitalmars-d mailing list