
On Wed, Mar 30, 2011 at 09:57, Paul A. Bristow <pbristow@hetp.u-net.com> wrote:
But there are *some* similarities between the two. (Often you feed a string and you get a 'check' be it a single 4 bit digit, or a loadsabits digest?).
Conceptually, I agree. But since the point of check digits is to find human-entry errors, the trade-offs and practical issues are totally different. For example, they only make sense for things short enough that a human would be willing to type, so having an interface that encourages sequentially providing 4-KiB blocks of unsigned chars makes no sense. Similarly, a human has provided it manually, so passing it as a wstring is a reasonable, performance-mostly-unimportant thing to do, compared to how long it took the user to type it. Especially since the checker might need to consider whether the ISBN-10 was entered with 'X', 'x', 'х' (Cyrillic ha), 'X' (fullwidth), or 'x' (fullwidth). ~ Scott