Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Floating point modulus

On 01/11/2015 12:00 PM, Bart Schaefer wrote:
On Jan 11, 11:25am, Ray Andrews wrote:
} Expectation you say.  Wouldn't it be polite for the docs to at least
} mention that?

The documentation has long been a sore spot, because it was originally
written to only cover things that were different about zsh (from other

You know, that is one of those sentences you make every now and then
that turns an entire fog bank into clear air.  *now* I understand how to
understand why the doc seems so faulty ... it was/is an addendum!
And it's been patched up ever since, but never was a 'full document'
from it's beginning, so of course it's full of gaps.
} Perhaps it's presumptuous of me to discuss this, but could a
} time not come when zsh is no longer chained to past practice?  When
} decisions are based on merit, not on what ksh '79 did?

Assuming I agree (which I don't) with your implication that decisions are
not already based on merit:  so far you haven't convinced me that this
would result in anything other than a lot of arguments about "merit."
Well, no doubt there would be some judgment calls on merit, no
avoiding that.  But since I've been involved ... actually the current
issue is a small but probably perfect test case. If one ignored past
practice and was concerned with maximum utility and most intuitive
implementation, and one was designing a shell that had a built in
calculator, and one was to decide what the answer should be to this

1/2 + 1/2 =

... I think we'd all agree the answer is '1'.  Why isn't it? Because
of past practice.  Thus Google's Library of Babel is plugged up with
people asking over and over again why shell arithmetic seems to be
busted. It's busted because of past practice.  The justification for
leaving it busted is just that it has always been busted, so should
always remain busted.  Is that merit?  I'll bet anyone 50 cents
that for every person who wants 1/2 + 1/2 = 0, there are a thousand
people who want it to equal one.

Messages sorted by: Reverse Date, Date, Thread, Author