Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Hyphen‐minus" is an ASCII abomination, and should only be used in ASCII‐constrained environments. Hyphen is hyphen and minus is minus:

‐ 002010;HYPHEN;Pd;0;ON;;;;;N;;;;;

− 002212;MINUS SIGN;Sm;0;ES;;;;;N;;;;;



The issue of non-ASCII-constrained environments is that it's still not easily accessible on most keyboards.

I do know and use the compose key but it's not the same as having a standard key for it. Trying on a mobile device, long pressing the dash key there suggests 2 dashes (not sure if the second choice is en-dash or em-dash), which is some but that's not the 4 types discussed here.


If a character is too difficult to type on some specific system, that is indeed a constrained environment.


Do you know one where it's easy to type? There are many international keyboards but I don't think any has that many dashes. Compose key is the best I think.


Reportedly, a “German standard keyboard according to DIN 2137-1:2012-06” has them: https://unicode.org/wg2/docs/n4984-Unicode-Proposal-9995-V7....


I was wondering what's better. The document is clearer if we use unicode.

But maybe for humans it's easier if we have a limited character set and use context instead. Like this.

In plain text, - is a hyphen:

    twenty-five, -1
In math context - is a minus sign

    $ (-1)^3 + x^3 $
Where it will be ensured to be rendered as appropriate


It’s easier to type HYPHEN-MINUS‐the‐keyboard-key, but text should be displayed using the appropriate glyph, depending on its semantic meaning, which is never HYPHEN-MINUS‐the-glyph.

(This discussion is similar to the classic net discussion about TAB‐the‐ASCII‐character versus TAB‐the‐keyboard‐key, with some people having trouble conceptualizing the difference.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: