Complex Meta Programming

bearophile bearophileHUGS at lycos.com
Sun May 18 13:29:57 PDT 2008


BCS:
> auto Foo(A,B)(A a, B b)
> {
>   if(a<b)
>     return Foo(++a, --b);
>   else if(a == b)
>     return b;
>   else
>     return a;
> }

Maybe for such things you need a type inferencer plugged into a "modern" type system, like the ones you can find in ML or Haskell.

Bye,
bearophile



More information about the Digitalmars-d mailing list