Some questions about Unicode aliases #76
Replies: 4 comments 3 replies
-
An additional third symbol to consider:
|
Beta Was this translation helpful? Give feedback.
-
@rljacobson Thanks for the comments and the information! In principle, I agree with the heuristic that you are proposing for assigning meaning to Unicode characters. Another thing we should consider is that we still do not have Input and Output Forms properly implemented in Mathics. The plan is to do that in a not too far future, and at that point, we have to see which representation of these symbols we should choose for these Forms. Finally, regarding where to record the discussion, assuming @rocky also agrees, I think it would be enough to add an entry in the documentation stating these criteria. If you are up for it, please rewrite the issue in the format of a documentation entry and make a pull request adding that file into mathics-scanner/doc. |
Beta Was this translation helpful? Give feedback.
-
What kind of test suites do you have that I should pay particular attention to? For that matter, what test suites does Mathics have in general? Cory Walker has a nice corpus of tests and documentation for his Wolfram Language implementation expreduce. His documentation has good coverage but is spartan, but I think it would nonetheless be a good starting point for language documentation that does not yet exist. I have advocated for independent documentation and test suite projects that Wolfram Language projects can pull in as desired, but that hasn't really materialized. |
Beta Was this translation helpful? Give feedback.
-
When it comes to Unicode characters used in Mathics3 and the specification in We have separated and isolated character symbols (to a large extent) from the rest of Mathics3. Therefore, front ends, ( In the case of And this is in line with the open-source philosophy: if there is something you don't like about the code, you can always go and change it. Good open-source software is transparent in its operation and tries to make it easier to alter it, especially in ways that might have controversy. That said, sure, we should try to provide something that is reasonable and does not require a lot of tweaking. But we don't have to get everything exactly right initially. The community will complain when something is egregiously wrong. And in contrast to Wolfram, we are not the ultimate gatekeepers of truth.
As best as I can tell, the existing tables follow these. I will put in a PR to adapt the heuristics, changing the "should" to "are" ; you can review the PR. There are tests we have over the tables which may cover some of these. And if there are more complete tests, by all means add them.
As far as I can tell, neither of these is dictated by Mathematica so it is not wrong to omit these. However, if a user wants to allow the mappings, the user is free to do so, with the understanding that it might also mess up others try to use the code but don't have such mappings. |
Beta Was this translation helpful? Give feedback.
-
I am taking a look at
named-characters.yml
at @rocky's request, and it occurs to me that there are some philosophical questions that should be answered about which Unicode symbols should be included and how. It appears Mathics has been relatively conservative with respect to adding Unicode aliases, so I think this discussion is really about making additions to what you already have from here on, not really about removing existing symbols.Broadly speaking, I propose the following heuristics:
−
(U+2212, "Minus Sign") should be an alias for ASCII-
even though Mathematica does not consider it so.✕
(U+2715, "Multiplication X") can be used forTimes
but is in the Dingbats Block and is thus excluded.≫
(U+226B, "Much Greater-Than") is already used forGreaterGreater
and therefore should not be an alias for>>
forPut
. Likewise,≪
(U+226A, "Much Less-Than") forGet
,∷
(U+2237, "Proportion") forMessageName
, etc.The general idea is to continue to be conservative while also covering compatibility and use cases we are reasonably likely to encounter. I also argue that having these heuristics written down somewhere is helpful for future contributors, whether future us or someone else, for a variety of reasons.
These heuristics do not cover all cases worthy of discussion. Here are two cases where it's not clear whether the Unicode aliases should be included:
≔
(U+2254, "Colon Equals") forSetDelayed
. This feels to me to be, while not exact, a close enough semantic correspondence to include it under heuristic 2.⋙
(U+22D9, "Very Much Greater-Than") forPutAppend
. This would be awkward to include considering≫
(U+226B, "Much Greater-Than") cannot be an alias forPut
(by heuristic 5).This issue is to solicit:
≔
and⋙
?Beta Was this translation helpful? Give feedback.
All reactions