Short list with things to finish for D2

Steven Schveighoffer schveiguy at yahoo.com
Mon Nov 23 12:34:55 PST 2009


On Mon, 23 Nov 2009 15:22:35 -0500, Bill Baxter <wbaxter at gmail.com> wrote:

> On Mon, Nov 23, 2009 at 12:11 PM, Steven Schveighoffer
> <schveiguy at yahoo.com> wrote:
>> On Mon, 23 Nov 2009 12:49:01 -0500, Bill Baxter <wbaxter at gmail.com>  
>> wrote:
>>> I think Walter had intended template mixins to take the place of
>>> macros.  They offer some features of macros but not all.  So once real
>>> macros exist, I wonder if there will be any real reason for them to
>>> continue existing.
>>
>> The thing I think macros give you over mixins is their usage is simple  
>> and
>> looks like part of the API.  Other than that, I don't think mixins are  
>> any
>> less powerful.
>
> Note that I was talking about template mixins, not string mixins.

Yes, template mixins seem to be less useful because you cannot simply  
write statements inside a template block.

> But really if we have macros, both template mixins and string mixins
> may be redundant.

The nice thing about having macros be a simpler syntax to do mixins is  
that mixins are a proven entity that work to do just about anything.  Some  
of the wizardry I've seen is amazing!  I'm unsure that a) macros could  
make mixins obsolete and b) macros should be significantly different than  
mixins.

-Steve



More information about the Digitalmars-d mailing list