On Tuesday, 28 October 2014 at 17:57:26 UTC, Russel Winder via Digitalmars-d wrote:
Python's take on this works quite well:

        x.sort()

is a mutating sort delivering nothing, whilst:

        sorted(x)

Yes, I also find the grammatical distinction interesting. One possible mapping:

- imperative for mutation: do "sort" !

- adjectives for value semantics: it returns a "sorted" version.

- present participle for generators: it adds "sorting" property to input.

Reply via email to