[Issue 8672] %% operator
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 16 14:44:44 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8672
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla at digitalmars.com
Resolution| |WONTFIX
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2012-09-16 14:45:34 PDT ---
Adding a new operator for an incredibly rare operation is not justified. A
library function should be used for this, if it matters at all, and I am not
convinced it does.
As Don pointed out to me, there is no "mathematical" definiton of modulus. And
as http://en.wikipedia.org/wiki/Modulo_operation makes clear, there is no
consistent definition of it in programming languages, with four different
definitions of it in use, not including "implementation defined" ones.
To say one version of modulus is "bug prone" and the other is not, is itself
erroneous.
There is simply no getting around the fact that the programmer needs to be
aware of what result he is trying to achieve with negative numbers.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list