News for hackers. Stuff that matters.
Re:Monospaced Programming Fonts with Ligatures by Pxtl on Friday July 21, 2017 @02:09PM (#14822600)
Honeslty, this should be handled by the language itself. If a language supports unicode, why not support ≠ for not-equals instead of "!="? Then provide a pre-processor that will replace all your ugly "!=" with the correct mathematical symbol.
Re:Monospaced Programming Fonts with Ligatures by dragonwriter on Friday July 21, 2017 @02:55PM (#14822955)
> If a language supports unicode, why not support ≠ for not-equals instead of "!="?

Perl 6 tends to support both multicharacter ASCII operators and single-character Unicode equivalents.

Re:Monospaced Programming Fonts with Ligatures by SwellJoe on Saturday July 22, 2017 @02:26AM (#14825726)
I love the way Perl 6 looks with Unicode, it's really beautiful, but I'm just not very comfortable typing Unicode. It takes me a split second to type ">>*<<", but much longer to type the Unicode equivalent (and I probably have to look it up). The editor could probably do it for me, but I haven't looked too deeply into how.

I think doing it with the font might actually be nicer from a usability perspective. Unicode is fun to play with but slows me way down.

Re:Monospaced Programming Fonts with Ligatures by InstanceOf on Sunday July 23, 2017 @03:32PM (#14833955)
Someone should make an optional IDE plugin or setting to convert them.
Re:Monospaced Programming Fonts with Ligatures by SwellJoe on Sunday July 23, 2017 @05:05PM (#14834388)
perltidy for Perl 6, perhaps, should offer it as an option. It'd only show up after you saved your code (or checked it in, or built it...I usually run perltidy on my Perl 5 code in my dist.ini, so it only happens during a dzil build).

One of the golang plugin bundles for Atom runs gofmt on every file on save which is actually pretty neat. I've been tempted to do the same for all of the languages I use. It sort of habituates me to do the right thing over time, as I see the changes happen immediately and I'm always working with a file that is mostly in the "right" style.

Re:Monospaced Programming Fonts with Ligatures by bsaul on Friday July 21, 2017 @02:11PM (#14822615)
agree except for the pre-processor part which should belong to the editor macro or keyboard shortcut space.
Re:Monospaced Programming Fonts with Ligatures by Pxtl on Friday July 21, 2017 @02:16PM (#14822649)
Well, providing the replacement engine as part of the language compiler package as a simple command-line tool you can hook into your editor of choice as a hotkey so I can say "replace all the operators in this file with their appropriate mathematical unicode counterpart".
Re:Monospaced Programming Fonts with Ligatures by masklinn on Friday July 21, 2017 @02:28PM (#14822745)
This is what e.g. many Haskell developers do, the issue is that this will usually fuck up alignment (because the base font does not contain the non-ascii symbols) and generate different alignments between different viewing contexts. It also leads to odd issues where deleting a character just changes it and doesn't move the cursor at all.

Ligatures are a time-honored way to improve the look and feel of combinations of characters, that's basically the entire point of them.