-
-
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
RFC: rename trace
to tr
#26365
RFC: rename trace
to tr
#26365
Conversation
I have never seen it written as |
See https://en.wikipedia.org/wiki/Trace_(linear_algebra). |
It also helps that this is now behind a |
I still feel that being in Stdlib is special. And something like LinearAlgebra will be widely used. |
I support |
Functions should have long verbose names so users variables can have short names. Otherwise people will write |
SciPy and Matlab also use "trace". And it is short, so why change it? |
There are already two letter names (qr, lu) and abbreviations (det, inv). tr for trace is very standard (I haven't ever seen trace written down in full) |
Wolfram Language also uses It could be confused with a shorthand for |
Googling on images for |
|
In physics, I rarely if ever see |
No love for https://en.wikipedia.org/wiki/Tr_(Unix)? |
I've seen both |
I've only ever seen the mathematical trace operator written in equations as |
I can foresee tr being in an html package (table row), tr is also a common Unix command, Total Return in finances, etc. Someone doing financial stuff may want to generate html reports and use linear algebra. If Julia is general purpose then to gain the full benefits of multi-dispatch shouldn't function names be long enough so people can combine packages and still be able to write generic code? Maybe this is better now but in the past it was problematic. Please consider other factors than popularity and people what don't have word auto-complete in there text editor. |
I agree with @GlenHertz here (except I don't like verbosity in general). It is nice to write
While It's even monosyllabic. |
It's the same argument for det & co. I usually write
In Julia there is at least https://github.com/MikeInnes/Traceur.jl (although in macro form). Trace in non-numerical programming languages usually means to examine the execution of a command, e.g. strace, dtrace, python's trace, etc. |
Personally I find |
I think readability by non-mathematicians is not a real requirement --- |
This seems to me to be exactly the same situation as the determinant which is always, always, always written as |
Evidence: just look through this google image search (courtesy of @mbauman): https://www.google.com/search?tbm=isch&q=linear%20algebra%20trace&tbs=imgo:1 |
This one's for @fredrikekre! |
Ok, looks like the "aye"s have it. |
trace was renamed to tr in #26365 but the deprecation in sysimg was not updated.
trace was renamed to tr in #26365 but the deprecation in sysimg was not updated.
In math this is always written as
tr(A)
, andtrace
could potentially mean other things.