There is some package that exports a @with_kw
macro that gives you struct constructors with keywords and defaults... I seem to recall that this actually exists in Base
somewhere but is not exported... anybody know what this is? I can't seem to find either one
Base.@kwdef
Nice, thanks. Do we know why this is not exported?
The package is Parameters.jl. As for the one in base, I think it is partly because Base could do something better (e.g. some syntax without a macro), partly because it is no trivial to decide what default constructors etc should be defined and partly because it is something that works fine from an external package.
Last updated: Nov 06 2024 at 04:40 UTC