Hi --

On Mon, 21 Jul 2008, Robert Dober wrote:

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

I'm afraid I don't follow that at all. What does it have to do with
other ! methods?


David

-- 
Rails training from David A. Black and Ruby Power and Light:
     Intro to Ruby on Rails  July 21-24      Edison, NJ
  *  Advancing With Rails    August 18-21    Edison, NJ
  * Co-taught by D.A. Black and Erik Kastner
See http://www.rubypal.com for details and updates!