You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getters and setters we currently use in the Ecosystem are only there because of the ⚥Sheep type which should demonstrate the forwarding of fields. We could get rid of all of them by overloading getproperty (and setproperty!) for ⚥Sheep instead:
function Base.getproperty(s::⚥Sheep, x::Symbol)
if x ==:sex|| x ==:sheepgetfield(s,x)
elsegetfield(s.sheep,x)
endend
The text was updated successfully, but these errors were encountered:
The getters and setters we currently use in the Ecosystem are only there because of the
⚥Sheep
type which should demonstrate the forwarding of fields. We could get rid of all of them by overloadinggetproperty
(andsetproperty!
) for⚥Sheep
instead:The text was updated successfully, but these errors were encountered: