------art_48680_6853792.1187218985455
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 8/15/07, dblack / rubypal.com <dblack / rubypal.com> wrote:
>
> Hi --
>
> On Wed, 15 Aug 2007, Simon Krahnke wrote:
>
> > * <dblack / rubypal.com> (16:48) schrieb:
> >
> >>> That is true for Array#delete. delete is always destructive, there is
> no
> >>> need to flag that.
> >>
> >> And push, pop, <<, concat, replace, clear...
> >
> > Which all have to be modifying. With the exception of concat. (The Unix
> > cat command isn't modifying.)
> >
> >>> 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
> !.
> >>
> >> I guess I take my cue from the Ruby core/standard language, where
> >> there's no use of !, as far as I know, except to distinguish a
> >> "dangerous" method from its non-dangerous partner.
> >
> > That's because of the completeness of the library. Whenever there can be
> > a non-modifying partner, there is one.
>
> ! does not mean modifying; it means "dangerous".


Just thought that I'd mention the usual example of the difference is exit
vs. exit! Neither is a "modifying" version of each other.

------art_48680_6853792.1187218985455--