-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unique polynomials #120
Comments
Not really. But it is probably due to a missing hash function or something like that. |
Yep, it is indeed because of the missing hash function. You can do this by overloading |
Better still would be to provide a working hash! |
Absolutely, yes. But as long as we do not have one, a hash that is not compatible with |
@wbhart I'd like to point out that hash is required in the ring interface; why don't we define |
Why don't we just add hash functions for types that don't have them? I don't understand this desire to implement trivial hashes. They are so terribly easy to implement properly, and there are plenty of examples. |
I don't understand why we should stick to the definition which (while with some merits based on performance) gives false mathematical results. And as we can see it's very easy to forget to define hash AND to find out which types don't define it. you don't have to take my word for it; just count the number of issues referencing this one: custom hashing is too easy to accidentally break and now there are n+1 of them ;-) |
I don't want to stick with the incorrect definition. But why waste all that effort to add trivial hash functions and tests and not the extra couple of lines to do it properly? |
On Thu, Jun 27, 2019 at 03:01:34PM -0700, wbhart wrote:
I don't want to stick with the incorrect definition. But why waste all that effort to add trivial hash functions and tests and not the extra couple of lines to do it properly?
Why haven't we done it already if it is trivial?
Point is: even we did not manage over the last years to implement hashes
for all our types, thus to implement a generic trivial one would be an
improvement. I agree that this might produce a false sense of security,
but if even we cannot manage to do it the 1st time round, then why do we
believe other users will do it correctly?
… --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#120 (comment)
|
@wbhart adding a correct fallback does not preclude us from providing specific hashes for particular types |
I support @kalmarek's suggestion as well |
Is the following expected?
The text was updated successfully, but these errors were encountered: