U+2212 Minus Sign in Computer Languages?

Walter Tross waltertross at gmail.com
Fri Nov 4 06:34:19 CDT 2022


FWIW: ECMAScript (aka JavaScript) 2022, Python 3.8, Java 17: all NO, for
all 3 meanings (unary/binary operator, negative number)

On Fri, Nov 4, 2022 at 2:11 AM Mark E. Shoulson via Unicode <
unicode at corp.unicode.org> wrote:

> 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}.
>
>
> ~mark
>
>
> 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/20221104/c6f171a0/attachment.htm>


More information about the Unicode mailing list