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
RFC: Implement complex(::Type) #13445
Conversation
This is very reasonable, but I worry that it puts us down the path of lowercase |
I don't think so (that these are like the lowercase constructors |
I will plan to merge this in a few days unless anybody objects more strongly. I do think this is distinct from lowercase |
Why not add a method to the uppercase |
This function mirrors lowercase |
Yes, the distinction is real and important. I was not thinking clearly when I made that comment earlier. |
I'm using These changes can easily be made later though, so as long as we have |
My suggestion was actually similar to what @andreasnoack said (somewhat more convincingly). So +1 to that. |
Currently there is a method
real(::Type)
that converts a type to its "real" part:This pull request adds a similar method
complex(::Type)
that behaves as follows:This is much more clear than writing
Complex{real(T)}
, which was necessary to get this behavior before.