[Issue 20982] Add a pragma to suppress deprecation messages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 27 08:19:21 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20982

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #4 from Basile-z <b2.temp at gmx.com> ---
(In reply to Andrei Alexandrescu from comment #2)
> Another idea from Stefan was to control this programmaticaly:
> 
> static if (deprecated(symbol)) {
>     ... avoid ...
> }

this could be a property instead, working on types and symbols and why not
everything (to avoid branches in metaprog)

  static if (symbol.deprecated){}

just like, `.tupleof`, `.mangleof`, etc...

But there's also the option that is not to allow abuse just because of one use
case and fix the use case instead, concretly: exclude deprecated symbol from
__traits(all,Members), if this is only about this. Or Add a 3rd optional
parameter to __traits(allMembers), which would be a set of flag, for now only
telling if deprecations have to ignored...

--


More information about the Digitalmars-d-bugs mailing list