From: "Brian Schröder" Date: 2005-05-26T21:38:34+09:00 Subject: Re: A different perspective on Ruby. On 26/05/05, gsinclair@gmail.com wrote: > ES wrote: > > > http://www.ericw.org/rants/showrant.psp?rant=ruby > > "It's 5.abs for absolute value, but Math.sqrt(5) for square root." > > Good point. That bugs me too. abs is a *function*, not logically a > method. > Why not 5.sqrt instead. Better to ask the object to do something, that to do something with the object. That allows to use duck typing and special casing to be done in the "special cased" object. I prefer "string".length a lot over length(string) regards, Brian > Gavin > > -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/