-
Notifications
You must be signed in to change notification settings - Fork 4
Unusual constructor design #30
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
Comments
It seems to me that the How about separating these coupled functionalities apart via: # type annotations are skipped for illustration purpose
struct Gauss3 <: AbstractShape3
center
radii
angle
v
end
struct Object{S, D, ...} <: AbstractObject
# no `shape` field
center
radii
angle
v
param
end
Object(shape, params) = Object{typeof(shape)}(shape.center, shape.radii, shape.angle, shape.v, param) I guess the reason you want to make But another question is, how necessary it is to store information in |
Thanks for the input! I would prefer to avoid the nesting of |
closed by #38 |
See:
#29 (comment)
The text was updated successfully, but these errors were encountered: