----- Original Message -----
From: "Ron Jeffries" <ronjeffries / REMOVEacm.org.web-hosting.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Monday, April 01, 2002 6:49 AM
Subject: Re: Why isn't Math object-oriented?


> 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.

I think I agree. My opinion is that the solution suggested by
Nobu Nokada should be standard; i.e., by default these
should be callable either as

    func(num)

or as

    num.func

After all... There's More Than One Way To Do It.

And Ruby abounds with aliases and synonyms anyway. (Some
people like this, others hate it. I like it.)

And there is also the consistency with the abs method (and others,
I'm guessing?) as Bill Kleb mentioned.

Hal Fulton