On Fri, Jul 25, 2008 at 7:02 AM, William Tanksley, Jr
<[EMAIL PROTECTED]> wrote:
> 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

I second all of this, and what everyone else has been saying. If we're
going to make a language change here (which it's reasonable to delay),
it shouldn't be to something like this, and out of the things proposed
so far, I like the ! suffix the best. (The stack effect issue is
orthogonal.)

Dan

-------------------------------------------------------------------------
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