On Sat, Mar 12, 2005 at 09:36:24PM +0100, Juerd wrote: > Larry Wall skribis 2005-03-12 12:26 (-0800): > > And arguably, the current structure of join is that the delimiter is > > the invocant, so cat should be defined as > > ''.join(@foo) > > This is what Python does. It does not make any sense to me, and I can't > wrap my mind around it at all. Ruby-ish @foo.join('') seems more > natural. > > Just like with how I prefer $fh.print($text) to $text.print($fh), I > cannot explain WHY this is how my mind works.
I'm with you. In my opinion, it is weird to call a method against a constant value; values aren't supposed to do things, they are supposed to have things done to /them/. For similar reasons, it is only slightly less weird to call a method on a variable when that variable is simply a container for a constant value. A variable that contains an object or "interface element" (e.g. a filehandle), I can understand calling methods against that. Ob flame retardant: I'm not saying that my opinion is necessarily right, or the other way isn't valid. Just offering a thought on why Juerd might have this feeling. --Dks