AutoHashEquals.jl icon indicating copy to clipboard operation
AutoHashEquals.jl copied to clipboard

Permit `@auto_hash_equals cached=true` with mutable struct types.

Open gafter opened this issue 1 year ago • 1 comments

Either

  1. Require that all declared fields are const, or
  2. Add const to each declared field (with a warning?) if not already declared so.

The advantage of doing this is that we get both an efficient hash code and an efficient equality (because of the === shortcut)

const on a field is only available in Julia 1.8 and later.

gafter avatar Jun 02 '23 15:06 gafter