Grafting Functional Support on Top of an Imperative Language

Christopher Wright dhasenan at gmail.com
Sat Apr 5 13:49:41 PDT 2008


Janice Caron wrote:
> Exactly how could the compiler deduce a version with const or mutable
> arguments? Would it be (a)
> 
>     invariant(C) f(const(C) x)
> 
> or would it be (b)
> 
>     const(C) f(const(C) x)
> 

You could use return const. But I'm not entirely sure. I was explaining 
what I understood of someone else's proposal.



More information about the Digitalmars-d mailing list