digitalmars.D.bugs - [Issue 8379] New: std.algorithm.findSplit example is freaking hard to read
- d-bugmail puremagic.com (30/30) Jul 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8379
- d-bugmail puremagic.com (15/15) Aug 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8379
http://d.puremagic.com/issues/show_bug.cgi?id=8379 Summary: std.algorithm.findSplit example is freaking hard to read Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: ellery-newcomer utulsa.edu --- Comment #0 from Ellery Newcomer <ellery-newcomer utulsa.edu> 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? *squint* 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8379 Ellery Newcomer <ellery-newcomer utulsa.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Ellery Newcomer <ellery-newcomer utulsa.edu> 2012-08-30 14:22:37 PDT --- Well, this is embarrassing. s/6484/8379/ on the following: Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/aa40b3b47d64dbf55bd559f113148925ced61ccf Merge pull request #753 from mylodon/enh6484 fix issue 6484 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 30 2012