Use cases for alias parameters

Chris Miller chris at dprogramming.com
Tue Nov 13 06:28:11 PST 2007


On Tue, 13 Nov 2007 09:12:09 -0500, Bruno Medeiros  
<brunodomedeiros+spam at com.gmail> wrote:

> I was reading the discussion at  
> http://d.puremagic.com/issues/show_bug.cgi?id=1100 , and then it got me  
> thinking:
>
> What are the use cases for alias parameters, other than:
> * parameters that are templates
> * parameters that are variables
> ?
>
> In particular is there any meaningful use case for:
> * parameters that are either variables or types ?
>

What about something that takes either a constant or a variable,  
determined by the caller, without code duplication? It is also especially  
useful with delegate literals, where this allows inlining.



More information about the Digitalmars-d mailing list