The Final(ize) Challenge

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon May 18 16:03:40 PDT 2009


On Mon, May 18, 2009 at 6:54 PM, Christopher Wright <dhasenan at gmail.com> wrote:
> Andrei Alexandrescu wrote:
>>
>> I think you need to operate exclusively with string mixins in Finalize, so
>> __ident would be of marginal help there. Also, static foreach is much more
>> necessary.
>
> That is a huge problem.
>
> Let's say that the class you want to finalize, Target, has a method like
> this:
> void foo(SomeClass){}
>
> Let's say that SomeClass is private and in the same module as Target.
>
> You *may* be able to do this with templates. Probably.
>
> You *can never* do this with a string mixin.

Exactly.  This is one of the problems I mentioned earlier, and I know
Andrei's got experience with this as well - std.algorithm doesn't
import std.math by default, so you can't use math functions in the
string expressions.  Oh sure, you could kludge that in there, but it's
far from scalable.



More information about the Digitalmars-d mailing list