[Issue 15087] DDoc: Add function attributes section for templates

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Sep 21 13:18:06 PDT 2015


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

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com

--- Comment #4 from Steven Schveighoffer <schveiguy at yahoo.com> ---
A template's inferred attributes can change with the wind, if something it
calls changes, or something passed changes. This would be a maintenance
nightmare if it's manually updated.

What I would suggest is possibly in examples, the compiler can add an
additional comment when generating ddoc of what attributes were inferred.

In other words, you could put:

foo(a, b, c) // sig...

where the compiler would allow a click on "sig..." to show the full signature
of foo used by this call.

This would also be backwards compatible (albeit confusing)

--


More information about the Digitalmars-d-bugs mailing list