Rather than forcing an implementation of __init__ on the user and having them opt into their own __init__ with @postinit, could you instead expose a function which has a method implementation for each module, and the user manually include that in their __init__? This is the approach that BinaryTraits.jl takes, reference here.
I think this would be much less disruptive to users workflows than having them restructure their existing __init__s per package.
I really like the idea that this package enforces the presence of fields as part of an interface, that's an issue I've not found a good solution for, and this looks promising. Thanks for the contribution!
Rather than forcing an implementation of
__init__on the user and having them opt into their own__init__with@postinit, could you instead expose a function which has a method implementation for each module, and the user manually include that in their__init__? This is the approach thatBinaryTraits.jltakes, reference here.I think this would be much less disruptive to users workflows than having them restructure their existing
__init__s per package.I really like the idea that this package enforces the presence of fields as part of an interface, that's an issue I've not found a good solution for, and this looks promising. Thanks for the contribution!