Slava Pestov <[EMAIL PROTECTED]> wrote:
> I don't like the ! suffix because it overlaps with comments. What
> about past tense to denote mutation?
> suffix suffixed
> append appended
> reverse reversed
> remove removed (or pluck, plucked)?
> remove-nth removed-nth (or snip, snipped)?

That won't work at all -- or rather, it's the opposite of what you
want. That's not the simple past tense -- it's the past participle. It
doesn't mean that the action has been performed; rather, it's an
adjective that usually indicates a _distinct object_.

For example, if you have a list and you write [list sorted] you're
implying that there are two possible lists -- one sorted and one
unsorted. Thus, past participle indicates duplication (i.e.
immutability), not mutation. This is why people are getting confused
about this proposal.

One example of my usage appears in Python, where the normal list.sort
method applies in-place, while the sorted() function produces a sorted
copy.

Now, if you want to be fancy with your grammar, using the past
participle would be excellent for non-mutating functions.

One warning: be consistent, please. Most languages fail at this (eg.
Ruby's "!" suffix).

> Slava

-Wm

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to