[Issue 12615] Warn against, and then deprecate old alias syntax
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 5 16:05:26 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12615
--- Comment #14 from Mike <slavo5150 at yahoo.com> ---
(In reply to Sobirari Muhomori from comment #9)
> Probably leave multialias declaration valid, it's quite handy:
> alias HANDLE BCRYPT_HANDLE, BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE,
> BCRYPT_HASH_HANDLE, BCRYPT_SECRET_HANDLE;
I believe that can be done with the 'new' syntax as...
alias BCRYPT_HANDLE = HANDLE;
alias BCRYPT_ALG_HANDLE = HANDLE;
alias BCRYPT_KEY_HANDLE = HANDLE;
alias BCRYPT_HASH_HANDLE = HANDLE;
alias BCRYPT_SECRET_HANDLE = HANDLE;
... which despite its verbosity, I actually prefer.
(In reply to Jonathan M Davis from comment #13)
> Has ever even been officially decided that the old alias syntax is going
> away? Personally, I'd hate to see it go, and the fact that the new syntax
> doesn't work in all of the places that the old syntax works makes it that
> much worse to use the new one IMHO. The resulting inconsistency is highly
> confusing.
One of them needs to go, and I prefer that the 'old' syntax go and the '='
syntax remains.
(In reply to Andrej Mitrovic from comment #6)
> Function pointers. There's an issue where 'alias f = extern(C) void
> function()' does not work (it's a filed bug). Until that is fixed we can't
> plan to go forward with this warning.
What's the issue number for this?
--
More information about the Digitalmars-d-bugs
mailing list