Summary: std.algorithm.findSplit example is freaking hard to
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from Ellery Newcomer <> 2012-07-11 
23:03:35 PDT ---
See, the function has a pretty descriptive name, and after reading the docs on
the function, it's clear the function probably does what I think it does, so
now I only need a quick confirmation with an example like that one right down
there and 

what the hell?? why is it returning that part of the array?


oh. that's a slice. what part of the array is it? probably the part I think it
is. glad I have so many fingers. hey, look! slice indeces and values at indeces
don't match up! so are a[6 .. $] and [7,8] the same thing? maybe. probably.
sure wouldn't want start programming under a slightly wrong assumption though.

anyways, my point is the array literal is tiny and slicing into it in the
asserts is unnecessary and inhibits readability. Also, string literals are more
readable than integer literals.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to