On Mon, Jul 21, 2008 at 1:02 PM, David A. Black <dblack / rubypal.com> wrote:

> It's a question of the accuracy of the method name. If dup doesn't
> actually mean "duplicate this object", then it's a bad name for the
> method.
Hmm I am not sure about that, I believe that true can be seen as a
completely different object than true without
coming up with any conceptional problems.
You are right if one looks at the "problem" on an complementation
level, but I ask myself if this is not a dangerous thing for the
language user.

Imagine for a second - and that might very well be done - that dup
does not dup but creates a marked reference to it's receiver that is
only copied on write, well following your rational should we not call
it #dup? then?

>The idea of dup! is that the ! would mean you've decided you
> want the not-quite-literal behavior.
I really dislike it, it somehow that implies that all ! methods are badly named.
From what you say and thinking again, the status quo seems fine to me.
#dup! really kind of steps out of the way.

Robert

-- 
http://ruby-smalltalk.blogspot.com/

There's no one thing that's true. It's all true.
--
Ernest Hemingway