We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm relatively new to Julia, and I wanted keyword constructors, which led me to the Base.@kwdef macro
However, this macro does not allow keyword dispatch, which led me to this package.
With KeywordDispatch, I can do something like this:
struct Bar a::Int b::String end @kwdispatch Bar() @kwmethod Bar(;a, b) = Bar(a,b) @kwmethod Bar(;a) = Bar(a=a, b="1")
It would be useful to have an analogous macro to @kwdef that will automatically define this first constructor:
@kwmethod Bar(;a, b) = Bar(a,b)
If this is already implemented, I'd appreciate a pointer as to how this is done.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm relatively new to Julia, and I wanted keyword constructors, which led me to the Base.@kwdef macro
However, this macro does not allow keyword dispatch, which led me to this package.
With KeywordDispatch, I can do something like this:
It would be useful to have an analogous macro to @kwdef that will automatically define this first constructor:
If this is already implemented, I'd appreciate a pointer as to how this is done.
The text was updated successfully, but these errors were encountered: