On Thu, Dec 4, 2008 at 3:26 PM, David Green <[EMAIL PROTECTED]> wrote:
> Something more explicit like "idiv" was suggested for integral division.
>  Personally, I'm happy not to have anything special provided for it, on the
> grounds that having to say, e.g. "floor($i/$j)", forces you to be blatantly
> clear that you're disposing of the remainder and how.

Using "div" instead of "/" should make it pretty clear that you're
disposing of the remainder.

The sorts of calculations that involve heavy use of integer quotients
typically also involve heavy use of the remainders, and it's only
reasonable that both halves be treated with equal respect in terms of
language support. A way to get both in one fell swoop would be nice
(e.g. Ruby's Integer#divmod), but at the very least, if we have mod
(%), we should have div, too.

-- 
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to