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

Every editor and language I use is fine with Unicode in files, but I don’t know if that’s true for everyone I collaborate with. Sure, I can type all those symbols, but can they? Does a screen reader pronounce them reasonably? Do they render correctly in GitHub’s web source code viewers? Will I ever get as fast typing composed characters as just pressing `>=`? Does everyone use a font that supports those codepoints? I don’t know. Probably, but who can tell? I tend to limit non-ASCII text to inside quoted strings and use exclusively ASCII-compatible codes for all identifiers.

But the great part about ligatures is that I can use fonts that support them and enable them in my editors because I think they look pretty. Anyone who doesn’t like their appearance can just not use them. We can both have editors that look nice to ourselves without making the other’s editors look worse. How often can we say that?



This is sort of my point: I would wish for the world to move towards typing Unicode symbols being a normal thing. That would also imply screen readers properly handling those (if they don’t already). What I don’t like is source code being rendered as something different than the actual printable characters it consists of.

I’m not disputing your preference, I was just stating mine. I do prefer “≥” over “>=“, but not in the form of a double-width ligature that is still “>=“ under the hood.

> Will I ever get as fast typing composed characters as just pressing `>=`?

Typing “>=” usually involves pressing three keys. The same can be true with Compose.

That’s not to say that there isn’t some trade-off in some cases. But the frequently used symbols can be prioritized, and it opens up a vastly larger repertoire of characters you can type. I routinely type foreign languages with accents and other non-ASCII letters using Compose, and it has become muscle memory.


The IDE could also do an automated ASCII to Unicode replacement for certain strings of characters if they are supported in a language, similar to how Microsoft Word automatically replaces (R) with ®, or the like.


in vim i can define abbreviations like this:

    :iabbr >= ≥
then, when typing ">=" it will automatically be converted to "≥" as soon as i hit space.


Exactly. Though in an IDE it should only be done depending on whether the current language supports the Unicode operators in question. And ideally the replacement shouldn't happen when editing string literals. Though perhaps that is asking for too much.


in vim you can make these definitions dependent on the file type, which is also used to detect languages for eg syntax highlighting. so it's certainly possibly to define these only for a specific language. it should even be possible to define it based on the syntax detected: https://superuser.com/questions/487603/abbreviations-overrid...


> Does a screen reader pronounce them reasonably?

I've been pushing the limits of emoji/Unicode recognition where I try to input it in an app or while communicating with others, and see what happens.

It's especially fun to use Emoji in the "favorite lists" for rideshare apps. In particular, each of my Favorite Waymo Destinations is accompanied by 3-5 Emoji which identify the unique spot or its category.

The really amusing part is that the Waymo car itself verbally reads off the destination when it gets underway. So the Emojis are translated into English and rattled off uncritically, but accurately, including incidentals like which skin-tones were chosen. It makes me giggle; I haven't found any unpronounceable glyphs yet!




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

Search: