Hacker News new | ask | show | jobs
by onei 1534 days ago
It's not strictly true to say a credit card number is not a number. It can be validated by Luhn's algorithm which is numeric in nature, but not in such a way that you would treat it as an integer.
1 comments

It's a sequence of single-digit integers, not a number
That's true for the mathematical definition of number, but not for the commonly used definition of number as "a numeral or combination of numerals or other symbols used to identify or designate" (4b at [0]). A common example would be a document number, which may often be alphanumeric.

[0] https://www.merriam-webster.com/dictionary/number

That's great. We're clearly talking about the definition of number used by HTML and all major programming languages. Whether a dictionary counts it as a "number" or not is entirely besides the original point—don't use integer or numeric types for storing or processing this data.
That is to say it's a numeral
Yeah. I'd say it's numeric, but doesn't represent a quantity.