Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Make _aaRehash @trusted #942

Closed
wants to merge 1 commit into from
Closed

Conversation

nordlow
Copy link
Contributor

@nordlow nordlow commented Aug 30, 2014

@quickfur
Copy link
Member

quickfur commented Sep 2, 2014

LGTM.

At first I was concerned about keyti.getHash being @system, but it appears that _aaRehash does not call it because the hash value is already stored in the AA node, so it seems reasonable to mark it as @trusted.

@nordlow
Copy link
Contributor Author

nordlow commented Sep 2, 2014

That's also the conclusion of the linked discussion.

@MartinNowak
Copy link
Member

because the hash value is already stored in the AA node

True, though I'm not sure if that is a reasonable requirement for any AA implementation.

@quickfur
Copy link
Member

quickfur commented Sep 5, 2014

Good point. A future AA implementation may implement rehash differently that requires re-evaluating the hash function.

Seems like the ultimate solution is to use template functions in a library AA implementation so that the compiler can infer attributes according to key type. Unfortunately that still seems a ways off.

@MartinNowak
Copy link
Member

Seems like the ultimate solution is to use template functions in a library AA implementation so that the compiler can infer attributes according to key type. Unfortunately that still seems a ways off.

Right, and I wouldn't want to commit on something that later breaks code, given the fact that it shouldn't be necessary to call rehash at all.

@nordlow nordlow deleted the trusted-rehash branch October 2, 2018 07:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants