|
From: Hans-Bernhard B. <HBB...@t-...> - 2014-04-18 13:41:58
|
On 18.04.2014 03:25, Philipp K. Janert wrote: > 1) how much of a problem is this (really)? > Regarding 1), I can offer this as "hard" data: on my > public gnuplot forum (over at Manning), there have > been 166 user questions over the last few years, and > as far as I recall, this issue has NOT come up. (Not > a huge data set to be sure, but it does not support > an urgent need for action.) I've been following the gnuplot newsgroup / mailing list, the SourceForge issue trackers and forums over a much longer time than that. The issue does come up once in a blue moon, but not really very often. E.g. since 2003 there were about 5 threads on the user mailing list, 4 entries to the bug tracker, and one entry as a feature request. That's not really a lot, given the mailing list alone had about 7600 messages over that time. In other words, this issue appears to cause on the order of 0.1 percent of the traffic. OTOH, the surprise caused by integers dividing like integers _is_ covered by the FAQ. So people who actually look at documentation before complaining about purportedly buggy programs will find it there, and we'll never hear about their being surprised. But overall, I'd call that enough of a non-issue that it really isn't worth breaking compatibility for it. > Personally, it does bite me occasionally, and like > Peter, by habit I always append a dot to denominators, > and I'd be happy if I didn't have to do that anymore. Division isn't all there is to this. We do make the distinction between ints, strings, and complex-floats, and we do so in a good deal more places than just division: the '%' operator being the most obvious other one. Then there's binary and boolean operators, shifts and alls that. Even '**' special-cases for integer arguments. With all that happening, looking at integer division as if it were an isolated decision for us to make, doesn't do it justice, because it's not. IMHO, as long as we support integers as a separate data type, there _has_ to be proper integer division, too. gnuplot's arithmetic is entirely based on that of C, and it's said so on the tin since basically day 1. If we dropped integer division, that promise would fly out the window, too. Actually, I'd even say that having to think about integer division is a useful way of reminding users (including ourselves) that integers do, indeed, exist in this language. And FWIW I completely reject that notion that just because Python or some other language do something, we ought to do so, too. If all languages were compelled to behave the same way, what could possibly be the point of having more than one in the first place? |