Skip to content
New issue

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

Compatibility with Julia 1.8 const on fields in mutable structs #149

Open
joaquinpelle opened this issue Oct 14, 2022 · 1 comment
Open

Comments

@joaquinpelle
Copy link

Julia now supports annotating individual fields of a mutable struct with const annotations. It would be nice if Parameters.jl allowed it, as

@with_kw mutable struct T
    x::Int
    const y::Float64
end
@mauro3
Copy link
Owner

mauro3 commented Oct 28, 2022

Yes that would be an excellent addition.

Note that Base.@kwdef does support this. So, with a re-write of Parameters on top of @kwdef, this would be taken care of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants