Bug 13901 – Improvements to documentation

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2014-12-27T22:54:00Z
Last change time
2016-01-18T06:31:41Z
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2014-12-27T22:54:55Z
This post contains a few good considerations regarding Phobos documentation: http://forum.dlang.org/post/[email protected] The constraint documentation needs to be revamped - automatic generation should generate the constraint separately. For example, instead of: auto sum(R)(R r) if (isInputRange!R && !isInfinite!R && is(typeof(r.front + r.front))); the doc should be: auto sum(R)(R r); Constraint: isInputRange!R && !isInfinite!R && is(typeof(r.front + r.front)) The constraint documentation should be user-definable by means of ddoc comments embedded in the constraint. For example, if the source is: auto sum(R)(R r) if /** R must be a non-infinite input range and its elements should support addition. */ (isInputRange!R && !isInfinite!R && is(typeof(r.front + r.front))); then the generated dox would be: auto sum(R)(R r); Constraint: R must be a non-infinite input range and its elements should support addition. Cross-linking to key concepts such as range, ElementType etc. must be present as hot links.
Comment #1 by kiithsacmp — 2014-12-27T23:44:11Z
Also, for constraints that are either very complex or common between different templates, see: https://issues.dlang.org/show_bug.cgi?id=13863 And also: https://issues.dlang.org/show_bug.cgi?id=13676 (to allow different styling for parts of signature and the constraint)
Comment #2 by kiithsacmp — 2014-12-27T23:44:43Z
Also, for constraints that are either very complex or common between different templates, see: https://issues.dlang.org/show_bug.cgi?id=13863 And also: https://issues.dlang.org/show_bug.cgi?id=13676 (to allow different styling for parts of signature and the constraint)
Comment #3 by jack — 2016-01-18T06:31:41Z