Skip to content

Support for kwdef constructors #62

@ameligrana

Description

@ameligrana

e.g. I imagine a syntax like

@sum_type @kwdef AT begin
    A(common_field::Int = 3, a::Bool = true, b::Int)
    B(common_field::Int = 1, a::Int, b::Float64 = 4.0, d::Complex)
end

and so it will work creating new all keywords constructors for each variant just like the kwdef macro works

julia> A(; b = 4)
A(3, true, 4)::AT

I will try to work out the details if this feature is welcomed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions