http://d.puremagic.com/issues/show_bug.cgi?id=5076
--- Comment #10 from [email protected] 2011-01-24 03:04:20 PST --- In Python sort() is in-place. To help programmers remember this, sort() returns None (like void in D): >>> a = [10, 30, 5] >>> sorted(a) [5, 10, 30] >>> a [10, 30, 5] >>> a.sort() >>> a [5, 10, 30] But in DMD 2.051 std.algorithm.sort() returns the sequence sorted in-place. Once a sorted/schwartzSorted are present, I suggest to let std.algorithm.sort() return void, as in Python. sorted/schwartzSorted may be tagged with @nodiscard from bug 5464 to further help programmers remember their semantics. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
