* <dblack / rubypal.com> (14:07) schrieb:

>> Your method should be called "apply!" because it's destructive.
>
> I could be wrong, but I think the convention (at least in core Ruby)
> is that ! methods always come in a pair with the non-! version.  I
> don't think there are any cases where there's just a method called m!
> where the ! indicates destructiveness (or other "danger"). All the
> unpaired destructive methods have non-! names.

That is true for Array#delete. delete is always destructive, there is no
need to flag that.

But there is no need for your method to be destructive, so you need to
tell the world about it.

> I think this makes sense. If unpaired dangerous methods have !, it
> sort of suggests that any time there isn't a !, the method is
> non-dangerous, which in turn suggests non-destructive... and that
> isn't true.

It should simply be clear from the name[0] if a method is destructive.
Often you need the ! for that, in some cases it's obvious without the !.

mfg,                  simon .... [0] is that actually english?