New syntax for string mixins

Nick Sabalausky a at a.a
Tue Dec 14 10:49:45 PST 2010


"Jacob Carlborg" <doob at me.com> wrote in message 
news:ie8dpq$kfg$2 at digitalmars.com...
> On 2010-12-14 13:05, Don wrote:
>> Graham St Jack wrote:
>>> On 14/12/10 20:33, Vladimir Panteleev wrote:
>>>> On Tue, 14 Dec 2010 09:30:46 +0200, Graham St Jack
>>>> <Graham.StJack at internode.on.net> wrote:
>>>>
>>>>> There is of course the worry that it could get so easy that everyone
>>>>> starts doing it, and we have (relatively) impenetrable code everywhere
>>>>> instead of just deep in the bowels of framework libraries.
>>>>
>>>> TBH, I'm more excited by AST macros which I understood are planned for
>>>> D3, as mentioned here:
>>>> http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf
>>>> They seem to promise the power of mixins, but without the mess.
>>>>
>>>
>>> I took a look at the pdf, but couldn't see how the AST macros could come
>>> close to the kinds of things that are possible (but difficult) with
>>> mixins.
>>
>> That fact was recognized at the conference, on the following day. As a
>> result, AST macros were dropped from D2.
>
> Do you have an example that would work with string mixins but not with AST 
> macros?
>
>> They need to roughly match string mixins in power. At this stage, there
>> is no proposal for how they should work.
>
> I think someone, Nick Sabalausky perhaps, suggested to have something like 
> the hygiene macros in Nemerle: 
> http://nemerle.org/wiki/index.php?title=Macros
>

Though I'm a huge D/systems-language/native-compiled guy, Nemerle's macros 
and pattern matching are two things I'm very jealous of and have made it 
very tempting to put up with the CLR for certain things.




More information about the Digitalmars-d mailing list