The Final(ize) Challenge

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 18 11:20:26 PDT 2009


Jarrett Billingsley wrote:
> On Mon, May 18, 2009 at 1:23 PM, Jarrett Billingsley
> <jarrett.billingsley at gmail.com> wrote:
> 
>> The first is a more general statement about trying to generate
>> functions with D's metaprogramming.  It is a huge pain in the ass to
>> actually create a function with a given name, because the only way
>> that I know this can be done is with a string mixin.  As soon as we
>> venture into that territory, we have to consider things like how to
>> convert a parameter type tuple into a string, and whether or not the
>> .stringof a type will be correctly qualified (I've run into problems
>> with this before, where some code in a library is not able to mix in a
>> string because it doesn't import the same modules that the calling
>> code does, and then you just get undefined identifier errors).  For
>> the love of all that is holy, can we PLEASE get something like
>> __ident("blah")?  This would be so much easier and would probably
>> drastically reduce my use of string mixins in general.
> 
> What about this front?  Is it out of the realm of possibility to get
> an identifier-izer?

I want this too, but first let's become able to do things we can't do 
and then to do things we can do, easier. The __ident thing has been on 
the table for literally years, I seem to recall I called it new 
alias("blah").

Andrei



More information about the Digitalmars-d mailing list