julia> const nt = (; a = 1)
(a = 1,)
julia> const a_ = nt.a
1
This defines a_
as a constant. Now julia v1.7 has introduced the new destructuring syntax
julia> (; a) = nt
(a = 1,)
Is there any way to use this syntax and declare a
to be a constant as well? Something like this doesn’t work:
julia> (; const a) = nt
ERROR: syntax: expected assignment after "const"