alias parameters and basic types

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 30 14:23:13 PDT 2016


On Saturday, 30 July 2016 at 19:21:27 UTC, Jonathan M Davis wrote:
> I think that Walter's answer in those bug reports is pretty 
> clear. An alias parameter aliases a symbol. Basic types are 
> keywords, not symbols, so they can't be passed as an argument 
> to an alias parameter.
>

alias bind to builtin types. There is no reason alias parameter 
shouldn't.

Having alias bind to basic type is some cases and not in others 
is just plain retarded. You can always look at each example 
individually and conclude that's fine. And, in fact, that's fine, 
when each of these is taken individually.

But when you look at the whole, it just doesn't add up.

> And I confess that I don't know why you'd even want to.

Unless that it is a polite way to say "it's useless", this show 
more lack of imagination than an actual problem with binding 
builtins.

Anyway, the use case is not super common, but it happened to me 
in the past, and resulted in great puzzling. Especially since, 
alias parameter freaking bind to values (which are not symbols 
either) and alias declaration do not.

The whole thing is completely messed up.



More information about the Digitalmars-d mailing list