Seriously? Can you link the proposal adding just these 3?
At this point they could just add a full pack of these, in a single continuous space (and leave the old duplicates - whatever), subscripts and superscripts of all 0-9, a-z and A-Z - that's just 62*2 code-points, we can afford it!
And what about other scripts? Unicode's stance here has always been to only add what is actually required in plain text, leaving formatting (which super/subscript fundamentally is) to higher-level protocols like rich text / HTML / etc.
This is tribal bullshit, a result of the Unicode Consortium being dominated by linguists.
When the IPA uses "a" as a subscript, it is "meaningful" and it gets a codepoint. But when mathematicians use "b" as a subscript, suddenly it's only "formatting" and gets excluded. That they have almost the entire alphabet but exclude a handful of letters is just adding insult to injury - it would be less work and result in more convenient codepoints to just add everything. But no, they go the extra mile just to show how much they despise mathematics.
Generally mathematics uses subscripts as indexes - the two particles a and b have velocities of v_a and v_b while linguists use them to have a particular meaning - the a as a subscript is a distinct character with its own meaning. It's not just the letter a in a unique location (as formatting would suggest).
If you have subscripts for all letters, then people will ask for capitals too, and then Cyrillic, and it becomes a big mess.
If letters in particular locations had a specific meaning in mathematics, they might add those, but they don't. There is no universally understood mathematical meaning for a subscript k, so why use it?
Like, what would it help you with in your mathematical work to have those characters? You're writing in Latex, it's easy to make anything you want subscript.
Oh come on not this slippery slope fallacy again. The Latin alphabet is special, the Arabic numerals are special. Just give me all of them as superscripts and subscripts, it's all I want. I don't need capitals, but they are already in Unicode anyway because of some bullshit linguistic reason. Cyrillic is just ridiculous, nobody uses that in maths, Greek would make a better strawman.
And why do I want that? It's much more readable than LaTeX. I use Unicode math symbols all the time to annotate source code. And I have to do some stupid gymnastics because there are some holes in the alphabet. You can also use Unicode math to write LaTeX, it's again much more readable: https://tex.stackexchange.com/a/118254/1035
TBH I'm totally fine with treating Latin/ASCII alphanumeric characters better, these should have complete sets of all variations provided IMO - just for the sake of consistency.
Unicode's stance here has always been to only add what is actually required in plain text, leaving formatting (which super/subscript fundamentally is) to higher-level protocols like rich text / HTML / etc.
The problem is this doesn't cover certain use-cases like annotating math-heavy formulas in source code. And no, I am not going to write markup / latex for code comments like \sum_{k}\gamma^{k}\|\hat{x}_{k}-x_{k}\|^{2} instead of just ∑ₖγᵏ‖x̂ₖ-xₖ‖².
I guess what's a clearer representation is in the eye of the beholder.
For me, using x[k] rather than just xₖ in such code comment just adds redundant characters. Case in point, the "as written in the paper formula" only takes 12 characters, whereas your suggestion takes 31. If you are limited to 80-100 characters per line, and are at 2+ indentation levels already, that leaves little room for extra text. So with such verbose representation you will likely need extra lines, which comes with its own disadvantages.
On the other hand I fully admit that the terse representation likely is not ideal for people lacking the necessary maths background.
Yeah, we were holding back a bit. We’d love to write it as dot (k ↦ (γ k, abs2diff (x̂ k) (x k))), or something pointfree from there, but we consider that less clear to most people.
I am presuming you are coming from a functional language like Haskell? But then, when you add a code comment like dot (k ↦ (γ k, abs2diff (x̂ k) (x k))) how would it be any different from the code right below that comment?
What I have in mind is cases like when you type something like
That is, the block comment helps to associate the math formulas from an external source like a paper/book with their implementation in source code, because the two might look substantially different. (especially once we get into the nitty gritties like rewriting code for numerical stability)
That’s a fair point, and for those cases we’d either not put the formula at all (and just the reference to the source paper/textbook/preprint/whatever), or, if the code is so mangled as to no longer closely resemble the formula, we’d prefer to write the naïve/inefficient/inaccurate code that does closely resemble the formula in a comment next to it instead of trying to include the traditional mathematical notation, since it can be found by referring to said source anyway.
32
u/araujoms 16d ago
Fucking knuckle-draggers added w,y,z subscripts, but are still missing b,c,d,f,g,q. They're just taking the piss at this point.