I read the docs but it is still not clear how one should define the relevant interface for types that have internally calculated fields. Eg
struct Foo
a
b
c
Foo(a, b) = new(a, b, hypot(a, b))
end
I want the user to be able to modify (= create a new immutable with) a and b, and pretend that c does not even exist.
I read the docs but it is still not clear how one should define the relevant interface for types that have internally calculated fields. Eg
I want the user to be able to modify (= create a new immutable with)
aandb, and pretend thatcdoes not even exist.