Document policy on use of non-ASCII characters
See original GitHub issueLast year, @Meuge used the original Greek names in her contributions to the poliastro.earth package, and I was ambivalent about it but I agreed to go forward. But then @Yash-10 opened #1191, in which he initially brought the variable names back to ASCII-only.
This is something that has been irking me for some time, and I would like to read other opinions. I think there are basically 3 options:
- Short, ASCII-only names: for example
(a, ecc, inc, raan, argp, nu). This is what we currently use almost everywhere.- Pros: Short, easily identifiable names. Easy to type in any keyboard.
- Cons: Sometimes we need transliteration of Greek letters (
nuinstead ofν) or we do a visual (wrong) transliteration (ninstead ofη). Also, they rely on a specific convention (nuinstead oftheta), and we are often inconsistent (nuinstead oftafor “true anomaly”,ainstead ofsmafor “semi-major axis”).
- Long, ASCII-only names: for example
(semi_major_axis, eccentricity, inclination, right_ascension_ascending_node, argument_periapsis, true_anomaly).- Pros: Easier to identify, no need to rely on a specific symbol convention.
- Cons: They are way too long 😭
- Short, non-ASCII names:
(a, e, i, Ω, ω, ν)- Pros: Short, easily identifiable names. Code looks similar to mathematical formulas. Julia people stop bragging that they’re the only ones who can do it 😜
- Cons: Difficult to type in a normal keyboard, difficult to search, relies on a specific naming convention.
And some considerations:
- If there is no consensus, the status quo wins. Meaning: current variable naming convention, current symbols convention, some inconsistency here and there.
- There are backwards compatibility concerns at play. Sure, poliastro is still
0.x, which means “we can break everything at any time” (and we do, all the time). However, changing(a, ecc, inc, raan, argp, nu)is a major change that should be justified. - And finally, for once I would like to take an evidence-based approach. So: yes, I want to hear everyone’s opinions on this. But if you back your opinions with data, your opinion counts more 🙃
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
RFC 7997 - The Use of Non-ASCII Characters in RFCs
The Use of Non-ASCII Characters in RFCs (RFC 7997) ... This document describes the rules under which non-ASCII characters may be used in...
Read more >The Use of Non-ASCII Characters in RFCs - » RFC Editor
This document describes the rules under which non-ASCII characters may be used in an RFC. These rules will be applied as the necessary ......
Read more >Is it possible to write package documentation using non-ASCII ...
Only ASCII characters (and the control characters tab, formfeed, LF and CR) should be used in code files. Other characters are accepted in ......
Read more >The Use of Non-ASCII Characters in RFCs
This document describes the rules under which non-ASCII characters may be used in an RFC. These rules will be applied as the necessary...
Read more >Code Inspection: Non-ASCII characters | PhpStorm ... - JetBrains
Non -ASCII characters used in identifiers, strings, or comments. · Identifiers written in different languages, such as myСollection with the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Some perspective and lessons learned from the Julia side since we have been doing this for a long time 😉 😉 😉
χ₁ = √μ * Δt * αbeatschi_1 = sqrt(mu) * delta_t * alphaby a mile in terms of readability.αas\alpha<TAB>, you are still hosed when you use e.g. plain Vi or Nano.long_snake_caseoverlscso that the short names remain available for scripting. Sostumpff_c2instead ofc₂orc2. I guess the latter point is not that important in Python because the convention is to qualify all imports.Finally here is a satirical package that serves as a cautionary tale about what happens if you do not show restraint about Unicode: https://github.com/theogf/WatchJuliaBurn.jl
In other words: this is now a documentation issue 😃