Jump to content

Talk:Multi-key quicksort

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Slice syntax

[edit]

@CiaPan: I'm fine with your changing the slice syntax to "not include the same item in two parts", but I actually intended it the right index to be exclusive (as it is in Python and Cilk). I now notice that in Haskell, from which I stole the actual notation, .. denotes an inclusive range:

Prelude> [0..5]
[0,1,2,3,4,5]

I do think, though, that we need a better, unambiguous notation. Do you think readers would understand a kind of half-open notation, viz.

a[0:i)
a[i:j)
a[j:length(a))

? QVVERTYVS (hm?) 12:38, 9 April 2015 (UTC)[reply]

@Qwertyus: Do as you wish. :) I know the Pascal notation where i .. j was inclusive, but I understand it is not widely used. Possibly some note about the expression meaning would be useful, possibly in the description after the code. If you think your notation is clear enough, just restore it, I'm not going to make a third revert anyway.--CiaPan (talk) 13:57, 9 April 2015 (UTC)[reply]
Changed it to my proposed syntax, and amended the footnote. QVVERTYVS (hm?) 19:52, 9 April 2015 (UTC)[reply]