>  use ZeroTrunc
    >  use CoffeeMachine
    >
    >So I'm very interested in to hear why 'this is horrible' :).
    >
    >    - Aleksi

I do not like the idea of including modules that change basic
behavior -- it violates the Principle of Least Surprise.

rant_mode.on

Consider C++.  When you're finished shuddering {:-)}, think about
the debugging nightmare that comes from careless and ill-conceived
operator overloaded.  You see:

    a = b + c

...and you have *no idea* what it really does.  You've got to
track down a.=, b.+, and maybe even a copy-constructor or two
before you know what code is being executed.

Of course, we can overload operators in Ruby as well, but now we
all know better and will do so with taste and style, right? :-)

It seems to me that a language should define it's mathmatical
model to be xxx, and that's it.  If you want different behavior,
use a different library *with different method names*, so that
the poor fool who comes along to read the code later has at least
a snowball's chance of figuring out what's going on.

I think div and divz is fine, but only one them should be "/" -
when I see "/" I'd like to know what is does, and not be
surprised.

rant_mode.off

/\ndy

--
Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development
web:   http://www.pragmaticprogrammer.com   email: andy / pragmaticprogrammer.com