Michael Neumann <mneumann / ntecs.de> wrote in message news:<20040602165312.GA25813 / miya.intranet.ntecs.de>...

> IMHO, even better would be if / would always mean floating point
> division and an extra // operator would mean integer division, but it's
> to late to change now (even for Ruby 2.0) :-)

We already have .div for integer division.  (13.div(7) == 2)
/ has an established meaning in the mathn library: 13/7 is the
rational number 13/7.  Since the standard libraries give wrong
answers when mathn is not required (and no one seems to have the
slightest interest in fixing them), the mathn meaning must be
the standard meaning.  NEVER use / for integer division:
use .div instead.

I don't like the Ocamlish /. .  It's fine for Ocaml, a strongly
and statically typed language, but it strikes me as alien to the
spirit of Ruby.  I'd rather just use .to_f (as in 13/(7.to_f)) to
force floating point.

Regards, Bret