(Was: On 80 columns should (not) be enough for everyone)

Jonathan M Davis jmdavisProg at gmx.com
Mon Jan 31 11:32:42 PST 2011


On Monday, January 31, 2011 11:13:40 Andrei Alexandrescu wrote:
> On 1/31/11 1:07 PM, Steven Schveighoffer wrote:
> > On Mon, 31 Jan 2011 12:09:01 -0500, Andrei Alexandrescu
> > 
> > <SeeWebsiteForEmail at erdani.org> wrote:
> >> On 01/31/2011 01:18 AM, foobar wrote:
> >>> You completely miss the most important principle - it doesn't matter
> >>> how good and efficient your product is if no one's using it. Phobos
> >>> is a very good product that I for one will never use. Just looking at
> >>> the one huge page for algorithms is enough to discourage many
> >>> people.
> >> 
> >> From what I've seen, everyone who advocates D2 mentions std.algorithm
> >> as one of its main strengths, and never as a liability. I have
> >> difficulty reconciling that signal with one opinion relayed anonymously.
> > 
> > I think the main problem is with ddoc. This, from std.algorithm is a
> > f**king mess IMO:
> > 
> > Jump to: BoyerMooreFinder EditOp Group NWayUnion OpenRight SetDifference
> > SetIntersection SetSymmetricDifference SetUnion SortOutput Splitter
> > SwapStrategy Uniq Until balancedParens boyerMooreFinder bringToFront
> > canFind completeSort copy count endsWith equal fill filter find
> > findAdjacent findAmong group indexOf initializeAll insert isPartitioned
> > isSorted largestPartialIntersection largestPartialIntersectionWeighted
> > levenshteinDistance levenshteinDistanceAndPath makeIndex map max min
> > minCount minPos mismatch move moveAll moveSome nWayUnion no none
> > partialSort partition reduce remove reverse schwartzSort semistable
> > setDifference setIntersection setSymmetricDifference setUnion skipOver
> > sort splitter stable startsWith substitute swap swapRanges topN topNCopy
> > uninitializedFill uniq unstable until yes
> > 
> > (in voice of comic-book guy) Worst navigation bar ever.
> > 
> > -Steve
> 
> Let's fix it! I'm thinking along the lines of finding some broad groups,
> e.g.
> 
> Searching
> 
> find until mismatch startsWith ...
> 
> Sorting
> 
> sort partialSort partition ...
> 
> Set operations
> 
> setUnion setDifference ...
> 
> ...?
> 
> We'd eliminate the unstructured "jump to" section and we create the
> grouping by hand (sigh).

At minimum, it needs to be smarter about user-defined types. The functions for a 
class or struct should not be grouped with free functions. They should be 
grouped with the type that they're in. _That_, at least, should be automatable, 
but it wouldn't help any with std.algorithm, since it's full of free functions 
(though it would be a big improvement for std.datetime). Unfortunately, you 
can't really automate the sorting based on usage. Best case, you could create 
tags on functions that said which grouping they went in, and perhaps that would 
be well worth doing, but you still have to worry about tagging them. So, on some 
level, the grouping is going to have to be done by hand.

- Jonathan M Davis


More information about the Digitalmars-d mailing list