From: Hal Fulton Date: 2003-09-03T04:22:56+09:00 Subject: Re: Python vs. Ruby james_b wrote: > Sean O'Dell wrote: > " > >> >> So, in my line of thinking: me.eat(food) >> "Hello world".print to me equates to: food.eat. >> >> I eat. Food doesn't eat. $stdout prints. Strings don't print. > > > Isn't this begging the question? > > The argument seems to be, "print has been defined for $stdout, not > string; since strings don't have 'print', string.print would not be not > correct." That's not what he's saying at all. He's saying that conceptually the print method *should* belong where it in fact is; that, conceptually speaking, he does not think of print as an operation belonging to a string. And I agree. A data conversion routine is one thing. I can see to_s belonging to Fixnum; that seems obvious. But a print belonging to Fixnum seems completely inside-out to me. Do you really want to implement every possible output method for every class, rather than just defining them for the thing that actually does the output, and then passing in a parameter? No flame intended. Obviously we'll have to agree to disagree here. Hal