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 we add "i" as a suffix for imaginary numbers (while keeping "j" also)? #92938
Comments
Isn't it a duplicate of #54771? |
10+ years later we can change our mind. Of course we should keep 'j' as well -- no deprecation. |
Agree, things are changing and some arguments against this are not so strong now. I prefer
They are not very strong arguments, but on other hand, supporting the |
Is there a specific reason why you are considering changing your mind now? Has something changed since that SO question was asked seven years ago, or last answered two years ago? "Python uses the engineering convention for complex numbers rather than the maths convention" is a perfectly valid reason to stick with j. Back in the Python 1,5 days I was annoyed that Python used j rather than i, but I got used to it, and I see no strong benefit to adding a second way to write complex literals. Although in support of this suggestion Coconut allows i as an alternative syntax. If we allowed i, there will surely be people who write numbers like 1I and that's just going to be awful, so maybe we shouldn't tempt them? I think that short of setting the ground work to eventually add quaternion literals 1+2i+3j+4k I kinda feel that this is churn for no real benefit. But I don't object to it. |
I was reminded of this by a privat document I read recently and regretted the choice of j. IIUC it’s only a small subcommunity (electrical engineering, where complex numbers represent A/C currents with phase) that really prefers j. In high school and college math(s) they teach i. I read on StackOverflow that C++ will get i. I figured I’d at least test the waters to see if there’s appetite for this now. |
See https://stackoverflow.com/questions/24812444/why-are-complex-numbers-in-python-denoted-with-j-instead-of-i
Why couldn't we support both
1j
and1i
with equivalent meanings?The text was updated successfully, but these errors were encountered: