-
Notifications
You must be signed in to change notification settings - Fork 31
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
Roadmap with respect to Base.@kwdef
#89
Comments
Parameters.jl/src/Parameters.jl Line 518 in 870131f
|
Maybe this relates: I defined the following struct @with_kw struct Vesicle{
C<:Number, #Curvature
AR<:Number, #Area
VO<:Number, #Volume
P<:Number, #Pressure
T<:Number, #Tension
L<:Number, #Length
R<:Real,
E<:Number, #Energy
}
m::C = zero(C)
A::AR
V::VO
ΔP::P
Σ::T
u0::C
u1::C
S::L
v::R
κ::E = 8e-20u"J"
function Vesicle(m::C, A::AR, V::VO, ΔP::P, Σ::T, u0::D, u1::D, S::L, v::R, κ::E) where {C,AR,VO,P,T,D,L,R,E}
(mm, uu0,uu1) = promote(m,u0,u1)
return new{typeof(mm),AR,VO,P,T,L,R,E}(mm, A, V, ΔP, Σ, uu0, uu1, S, v, κ)
end # function
end # struct but |
A breaking change would probably be to fix #96 to be consistent with |
Much of the
@with_kw
functionality has been implemented inBase.@kwdef
, see JuliaLang/julia#29316, which will go into Julia 1.1. Once Julia 1.1 has been release, this should be used in Parameters. The plan could be to keep the@with_kw
macro which would use@kwdef
internally and enhance it with its "missing" features (show, reconstruct, type specific unpack macros, auto-documentation,@assert
s).The text was updated successfully, but these errors were encountered: