Document how to generate it then.Tord Romstad wrote:That would make things even worse -- huge arrays of numbers which look meaningless to the reader is exactly what I want to avoid.
The explanation is simple, try random numbers until one works. The actual hash function is what will probably take the largest amount of text to document and you will have to document this anyways.The source code should be self-documenting, and not contain a bunch of magic numbers which do not make sense without a long explanation.
Writing magic generation code at startup seems like an overkill workaround for not having to explicitly document code. The tables arn't that large anyways, just arrays of 64 and you can use higher quality magics if you pregenerate them.