dst = src rather than src dst
Bill Baxter
dnewsgroup at billbaxter.com
Wed Sep 5 02:43:49 PDT 2007
Janice Caron wrote:
> 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 just prefer the destination on the left. Moreover, it would make for
> greater consistency throughout D. It would match up with assignment
> operators, module import renaming, and alias template specializations.
This has been suggested before. I'm all for it. Since types are just a
kind of value in the realm of compile time evaluation, it makes sense to
just have them use the same syntax. It also puts the part you care
about (the symbol you're going to be using) right up front where it's
easy to find. Actually that's the part I really care about. I wouldn't
mind if the syntax used ':=' or something instead of '=', I'd just like
to see the order reversed.
--bb
More information about the Digitalmars-d
mailing list