Closed ahelwer closed 11 months ago
---- MODULE Test ----
CurrentDiamondOperator == □⋄P
NewWhiteDiamond == □◇P
TestHandleParseError == 1 + 2 + 3
====
Here's a test of how the operator looks. Since the diamond operator is often used next to the box operator, it actually makes sense that they would be drawn from the same unicode block. I think the proposed new white diamond operator looks quite a bit nicer. The TLA+ tree-sitter grammar highlighting used by github fails to highlight it right now of course (since it's invalid syntax), but it seems to recover from the parse error fairly well. I propose changing the diamond operator to ◇ White Diamond (U+25C7) Geometric Shapes Block. Work necessary:
<>
to new diamond symbolGithub highlighting was updated so all tasks have been completed.
Related, the action composition operator \cdot
is tiny on macOS:
Yeah this one is difficult because there are four different circle operators that all need to look different:
\cdot
\bullet
\circ
\bigcirc
Maybe could switch \cdot
and \bullet
or something but idk. There isn't a lot of visual variation available for circles other than size! I don't even think filled in vs. not will be standardized across fonts.
The current diamond operator shows up quite small in some cases (VS Code in macOS, see https://github.com/tlaplus-community/tlauc/issues/4). Currently we use:
⋄ Diamond Operator (U+22C4) Mathematical Operators Block
Here are some alternatives:
The diamond operator (current standard) is semantically the most appropriate, as it is included in the mathematical operators block. The specific font used in VS Code in macOS certainly displays it weirdly (some would say incorrectly). The White Diamond symbol of the Geometric Shapes Block is probably the most appropriate alternative. Note the
[]
operator is currently □ White Square (U+25A1) Geometric Shapes Block (no equivalent exists in the Mathematical Symbols Block weirdly) so this is not without precedent.