Perhaps use metadata as an alternative to resolve-key?
gerdint opened this issue · comments
Tobias Gerdin commented
As described in the Integrant README in Kit we stored extra data in a component instance and made use of ig/resolve-key
. But Dimitri Sotnikov then came up with the idea of storing the extra data as metadata. I think this is a very elegant solution which removes the need for resolve-key
:
kit-clj/kit@f8a94c1#diff-51ac4e96c346210de813ab1b0635a210dc4c10a8c0356f79ad3e6d34f9451978
WDYT? Perhaps mention in the README?
James Reeves commented
It's certainly an option. It can't be used for everything, however, as not every object implements clojure.lang.IMeta
.
Tobias Gerdin commented
Right, I see your point. Resolve-key will indeed be useful in those cases, yes.