From: Christoph Date: 2002-04-02T04:30:28+09:00 Subject: Re: Why isn't Math object-oriented? wrote in .... > At Mon, 1 Apr 2002 22:49:48 +0900, > Mike Campbell wrote: > > I'm new here, but I think the original question was not "how do I do it", but > > "why is it like this", which Matz answered. > > Yes. I just proposed an alternative without changing Ruby. A plausible alternative is to change Ruby and reconstitute the current behavior in the Math module. module Math def sin(x); x.sin end .... end From a practical point of view adding default container classes Set, Multiset, and (un)ordered n-Tuples (these are easy to implement in Ruby of course) might do a lot for the mathematical attractiveness of Ruby (maybe this should be rubical attractiveness of Mathematics;-). > > > Still, I tend to agree with Ron; it seems unclean having a procedural set of > > Math operations when most things aren't. > > But mathematics is not object oriented. But at least some of the specialized mathematical scripting language like Macaulay-2 are kind of (claim to be?) object oriented - i.e. the categorical claim (the non-math kind) that mathematics is not OO seems a bit strong to me. A visible stumbling block of reconciling mathematics with ``single receiver-type OO'' is the often mathematically unnatural (I know a lot of people would probably think that this was a tautology) distinction of method receiver and method argument(s). /Christoph