[Issue 15087] New: DDoc: Add function attributes section for templates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Sep 18 21:13:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15087
Issue ID: 15087
Summary: DDoc: Add function attributes section for templates
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: jack at jackstouffer.com
Currently, as function templates are auto attributed, there is no way to know
if a template is nothrow, pure, @nogc, or @safe without trying to run it in
your code and seeing if it will compile. That sucks and is tedious.
So what this bug report is proposing is to add a new section in ddoc headers
that allows maintainers of phobos to very visually show what attributes the
template will have with what arguments.
Sure, sometimes the documentation will say that if the template is @nogc or
not, but not all the time.
Also, this answers a common question new comers have, which is "doesn't the std
lib use the GC?" To which the response is "Not all of it". To which the follow
up is "Ok, what parts use it and what parts don't?", followed by crickets.
--
More information about the Digitalmars-d-bugs
mailing list