Hacker News new | past | comments | ask | show | jobs | submit login

Actually, if you consider strict nomenclature, modulo should be positive since it's a mathematical concept and that's what it's mathematical definition would require.

The fact that it has been (ab)used as a shorthand for the remainder of integer division is unfortunate, but that suggests there ought to be a "remainder" keyword (or operator).

We've gotten into a bad habit of calling things by the name of their implementation rather than by what we actually expect of them. This confusion is just a side effect of that problem.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: