[Issue 3923] std.algorithm.find is too much hard to understand

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 8 07:44:31 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3923


Steven Schveighoffer <schveiguy at yahoo.com> changed:

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


--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> 2010-06-08 07:44:28 PDT ---
This is typical of STL documentation too.  The issue is that because of the
power of templates, you can pack an amazing amount of usages into one function,
and IFTI makes it resolve to the simplest form.

What I would advise is to read the examples, not the signature.  Most of the
time, you do not need the full power of find's features.  In particular,
calling the second argument needles, and calling the type Ranges makes it
difficult to understand you can simply just pass a single value to get what you
want.  But the examples are easy to understand.

Maybe a message at the top of the std.algorithm page to recommend reading the
examples if you don't understand the signatures.

One thing that Tango does to help in this regard is to have a version(ddoc) for
complex signatures so one can fine-tune how the signature looks in ddoc.

Maybe an enhancement for ddoc would be to be able to specify a simple signature
form, then you could click on a link to have it expand to the full signature.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list