U+2212 Minus Sign in Computer Languages?

Mark E. Shoulson mark at kli.org
Thu Nov 3 20:07:34 CDT 2022

Well, see, now there are *three* different meanings under discussion.  
There's the unary operator and the binary operator (which most 
programming languages unify but which cannot be unified in postfix 
notation, as you say), and also the negative number syntax.  APL, iirc, 
does indeed use "-" for both subtraction and negation, i.e. both 
operators, but the high-minus was *not* an operator, it was part of a 
numeric literal, it's how you wrote "negative three" (as opposed to 
writing "the negation of three.")  Given APL's strict (lack of) operator 
precedence, it could be inconvenient to have to write negative numbers 
as operators applied to positive numbers, but a syntax element doesn't 
have that issue.  That's why I compared it to Lojban's {ni'u} as opposed 
to {vu'u}.


On 11/3/22 05:27, Alex Plantema via Unicode wrote:
> Op do 03-11-2022 om 02:46 schreef Tim Partridge via Unicode:
>> I suspect most programming languages follow the unification of hyphen 
>> and minus on typewriter keyboards which led to early character 
>> standards doing the same.
>> Also number formatting and parsing routines use the dual use 
>> character for negative numbers and tend not to recognise U+2122.
> Such a unification isn't possible in postfix notation, unless 
> negations are replaced by subtractions from zero.
> https://stackoverflow.com/questions/46861254/infix-to-postfix-for-negative-numbers
> -- 
> Alex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://corp.unicode.org/pipermail/unicode/attachments/20221103/4404e0d7/attachment.htm>

More information about the Unicode mailing list