From: Dave Benjamin Date: 2004-04-05T14:09:19+09:00 Subject: Re: deciding between ruby and python In article <1081124063.259819.9185.nullmailer@picachu.netlab.jp>, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: deciding between ruby and python" > on 04/04/05, Guillaume Marcais writes: > >|Just a as we are on the subject. Should Ojbect#to_s return self.to_str >|if it is defined instead of the default value? > > I encourage defining "to_str" along with string methods, i.e. by > defining "to_str", I expect the object to be a duck quacks like > strings. In that sense, you have to think before defining "to_str", > more than it seems, even though your proposal makes sense. I'd really like to understand what you mean, here. In your first sentence, did you mean to say "I expect the object to be a duck *that* quacks like strings?" If so, what does it mean to quack like a string? If not, what were you really trying to say? Thanks, Dave -- ..:[ dave benjamin: ramen/[sp00] -:- spoomusic.com -:- ramenfest.com ]:. : please talk to your son or daughter about parametric polymorphism. :