-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
should default constructors use field types as their argument types? #250
Closed
JeffBezanson opened this issue
Nov 2, 2011
· 3 comments
· May be fixed by JuliaDiff/ChainRules.jl#302
Closed
should default constructors use field types as their argument types? #250
JeffBezanson opened this issue
Nov 2, 2011
· 3 comments
· May be fixed by JuliaDiff/ChainRules.jl#302
Comments
ghost
assigned JeffBezanson
Nov 2, 2011
+1 |
This will not only be safer but also way easier to explain (usually a good sign). If someone wants conversion semantics, they can write a custom constructor function. It's easy to do if you want it. |
JeffBezanson
added a commit
that referenced
this issue
Nov 2, 2011
… argument types. tests pass, but beware of things potentially breaking/changing.
OK, done. I only needed to change one type declaration. Be on the lookout for others. |
cmcaine
added a commit
to cmcaine/julia
that referenced
this issue
Sep 24, 2020
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Oct 11, 2021
Introduce four different weight types with different bias correction factors for variance, covariance and standard deviation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the default constructor for:
will have the signature
Foo(Any,Any)
, and whatever you pass will be converted (as with any field assignment). Maybe we should change this toFoo(A,B)
to make it harder to make unintended objects.The text was updated successfully, but these errors were encountered: