Hacker News new | ask | show | jobs
by nvy 702 days ago
>Computer integers aren't the real numbers you learned about in gradeschool

Why would anyone think computer integers are real numbers? Anyone who's given it a modicum of thought will know intuitively they're a subset of "real life" integers, not reals.

>using 0,x is a perfectly reasonable and intuitive way of defining things.

I would argue it's neither reasonable nor intuitive. If you want to create some special data type then have at it, but if the behavior of `int` doesn't approximate the behavior of IRL integers, call your data type something else.

1 comments

x+1 is sometimes less than x ... is "IRL" integers? Division of any integer by any number (other than zero) is an integer ... is "IRL" integers?

Seems to me that ship has sailed!

Are you unfamiliar with the meaning of the term "approximation"?