dst = src rather than src dst

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Sep 5 06:42:40 PDT 2007


"Janice Caron" <caron at serenityfirefly.com> wrote in message 
news:mailman.91.1188982444.16939.digitalmars-d at puremagic.com...
> Please could D allow the following syntaxes
>
> alias dst = src;
> typedef dst = src;
>
> Instead of (or as well as)
>
> alias src dst;
> typedef src dst;

I doubt this will ever change, so to help you get used to the current 
syntax, here's how I think of it:

int x;
void function(int) fp;
float[] f;

These are some variable declarations, right?  Now just add alias or typedef 
in front.

alias int x;
alias void function(int) fp;
alias float[] f;

Now they're legal aliases.

Think of them like a variable declaration, except instead of making a 
variable, you're making a type. 





More information about the Digitalmars-d mailing list