From: Ron Jeffries Date: 2002-04-01T21:49:58+09:00 Subject: Re: Why isn't Math object-oriented? On Sun, 31 Mar 2002 15:44:46 GMT, matz@ruby-lang.org (Yukihiro Matsumoto) wrote: >Hi, > >In message "Why isn't Math object-oriented?" > on 02/03/31, Bil Kleb writes: > >|What happened? Why did the idiom change? Why isn't Math >|implemented as a mixin for the Numeric class a'la Enumerable >|or Comparable or Kernal, etc.? > >Because > > sin(x) > >was the notation I used often. One of the design princeple of Ruby is >the "conservativeness", which is more important than orthogonality. I'm OK with sin(x) working. I'm not OK with not being able to say r*theta.sin + r*theta.cos because that's how every other similar operation would be expressed in Ruby. I needed to do one of these things recently. When I said 4.sqrt and it didn't work, I was /very/ surprised. The two ways are not incompatible, as far as I can see. Just one man's opinion, of course. Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.