Skip to content
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

When cacheing, rewrite existing inner ctors to use the inner ctor that is generated instead of new. #38

Open
gafter opened this issue Mar 29, 2023 · 1 comment
Labels

Comments

@gafter
Copy link
Member

gafter commented Mar 29, 2023

See https://github.com/RelationalAI-oss/MuttsInterface.jl/blob/master/src/MuttsInterface.jl for one way to do it.

@gafter gafter changed the title Rewrite inner ctors to use the inner ctor that I wrote instead of new. When cacheing, rewrite existing inner ctors to use the inner ctor that is generated instead of new. Aug 18, 2023
@gafter gafter transferred this issue from JuliaServices/AutoHashEqualsCached.jl Aug 18, 2023
@gafter gafter added the up next label Aug 18, 2023
@gafter
Copy link
Member Author

gafter commented Oct 23, 2023

This can be used to address comments in raicode such as

# TODO Once AutoHashEquals supports inner constructors with typed arguments, we can use
# @auto_hash_equals cache=true hashfn=xxxxx typearg=false typeseed=yyyyy compat1=true struct Zzzzz
#     ...
# end
# Note that current `@auto_hash_equals` will then define new methods for both
# `xxxxx` and `Base.hash` for `Zzzzz` in terms of `xxxxx`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant