-
-
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
default inner constructors should accept any arguments #4026
Milestone
Comments
+1 |
I anticipate mild outrage over how easy this is to fix. |
I am mildly outraged :-P |
This is really, really nice. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once upon a time if you did this, it would work:
It was pretty convenient. However, back then
convert
was quite aggressive and this also worked:This was deemed dangerous and confusing, so default constructors were changed to not call convert for you. Today, however, convert is far more conservative and
convert(Int,1.5)
fails with an InexactError. Therefore, I propose that we reinstate the old convenient behavior of calling convert automatically in inner constructors.The text was updated successfully, but these errors were encountered: