Compatibility with Julia 1.8 const on fields in mutable structs
joaquinpelle opened this issue · 1 comments
joaquinpelle commented
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 commented
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.