On Sat, Sep 19, 2009 at 12:28 AM, Joel VanderWerf
<vjoel / path.berkeley.edu> wrote:
> Perhaps it should be the responsibility of users of numeric operators to
> #floor explicitly when that is the intent, rather than rely on the (mostly
> standard, sometimes convenient, but questionable) 1/2==0 behavior. Doing so
> would make it easier to adapt the code to float, rational, or other numeric
> types.
>
> In your proposal, would Rational(1,3) be the preferred notation, since
> 1/3==0? Or would there be something else, 1//3 or ...?
>
> I've always thought of mathn as a kind of alternate ruby, not just another
> core library, hence to be used with caution...

I think Brian Ford expressed what I feel best...there should always be
another method or operator. Using another operator or method is an
explicit "buy-in" by the user--rather than a potential (at some
undetermined time in the future) that everything you know about
integral division in your program changes wildly. It should not be
possible for any library to undermine the basic mathematical
expectations of my program. Doing so, or expecting the user to do
extra work to guarantee the *common case*, is a recipe for serious
failure.

- Charlie