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

Any plans to become compatible with Parameters.jl ?

Open j-fu opened this issue 2 years ago • 2 comments

First: great package ! I feel it can solve some of my design conundrums using this.

Do you have any plans (and any chance) to make this compatible with Parametes.jl, so we coud use @with_kw along with @kwdef ?

j-fu avatar May 16 '22 08:05 j-fu

Wasn't thinking about this. I forget exactly how @with_kw works but if its the same as @kwdef it might be as easy as just adding a check for it here https://github.com/marius311/CompositeStructs.jl/blob/main/src/CompositeStructs.jl#L40 if you're willing to give it a try

marius311 avatar May 16 '22 16:05 marius311

Ok, I feel it mostly works, see #5 . I am not deeply into this, so unable to give any guarantees.

The main advantags I expected (default values in docstrings and Base.show method) don't work, but these are nice to have.

j-fu avatar May 16 '22 17:05 j-fu