From: Lionel Thiry Date: 2005-11-06T08:07:09+09:00 Subject: Re: [ANN] Ruby/GD2 alternative to Ruby/GD Yukihiro Matsumoto a �crit : > Hi, > > In message "Re: [ANN] Ruby/GD2 alternative to Ruby/GD" > on Sat, 5 Nov 2005 23:08:32 +0900, Rob Leslie writes: > > |> I don't think resize! and find! do not require bang sign in the > |> name. Note that, unlike Scheme, bang sign indicates "more > |> dangerous" alternatives to non bang ones in Ruby, for example, sub > |> (returns modified copy of the receiver) and sub! (modifies the > |> receiver in place). > | > |Actually, I was conscious of this; the non-bang Image#resize does not > |modify the receiver but returns a new image instead. Also, > |Palette#find never modifies the palette, but Palette#find! allocates > |the color if it doesn't already exist. > > Hmm, I should have checked the API before making comments, sorry. But > I still feel something weird with find!, but I can't express myself well. > > matz. find usually takes a block, doesn't it? Perhaps Palette#find should be Palette#include? and Palette#find! should be Palette#add! ? Doesn't it make sense? -- Lionel Thiry Personal web site: http://users.skynet.be/lthiry/