meggart / SentinelMissings.jl

Other
8 stars 0 forks source link

Constructors compatible with Setfield.jl/Flatten.jl etc #3

Open rafaqz opened 2 years ago

rafaqz commented 2 years ago

As usual I'm looking to reconstruct the SentinalMissings array object using ConstructionBase.jl, but it has type parameters not known from the fields.

I'm wondering if it would be possible to:

a. use a second field that holds a Val{SV}() object where SV is the sentinal value. b. add a ConstructionBase.jl dep to add constructorof method that keeps the SV param.

Probably the first is preferable, as this package is so tiny.

meggart commented 2 years ago

Yes, I think option 1 would be no problem to implement. I can try next week.