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

Why does a programming language need its own font?


Why not?

But seriously, it's of great benefit to Go programmers to have a font that shares the same license as Go itself. Most fonts are not so unencumbered.


I was surprised to see that you didn't add any Go-specific code ligatures (e.g. for <- like Fira Code provides[1]).

Has there been any thought into providing a variant with some? While I could see why some might be against them I think they're rather fun and can make code more readable.

[1] see for example https://github.com/tonsky/FiraCode


This is honestly where I thought this was going when I saw the title. It would be cool for a font to be invested in the language it's used to describe to the point where it supports features of that language.

I use Fira Code for JS, HTML, and CSS and it's great. Very rarely to the extra fun ligatures get in the way, and when they are printed they look absolutely gorgeous. I wish all/most code samples in tutorials and articles were set in it so they would be a pleasure to read.

But these fonts left me scratching my head.


fyi you can get most sites to honor your font with a combination of the browser's default monospace font and extensions like Stylish.

even this comment box respects Fira Code, see[1]

[1]: https://imgur.com/a/LjbS3


There aren't that many places where Go's syntax would make such things useful. There's := and // for comments. A case could be made for [] to indicate slice. Reading over some code the only other one that seems to come up a lot is (), which is just "calling a function with no arguments" and I'm not sure I'd want that particularly distinguished. Comments are generally already color coded, so that really just leaves :=.

Although I could make a case for making :+ some sort of ligature that makes it obvious I just screwed up by holding SHIFT too long. :) You won't see it by scanning my code base, but I definitely type it a lot....


Because it's extra, unnecessary cruft. May as well throw in generics as well, and inheritance and may as well develop your own OS for go while you're at it.

As you can tell I think this is just a silly waste of time for a compiler. Non native applications are near universally ugly and poorly designed and adding a custom font is just another slap in the face.


> Because it's extra, unnecessary cruft. May as well throw in generics as well, and inheritance and may as well develop your own OS for go while you're at it.

False equivalences are fun. :-)

> As you can tell I think this is just a silly waste of time for a compiler.

But the people who did this have nothing to do with the compiler.


Extra cruft from a technical perspective, but it is clear that the law was the primary driver here.


The font is ostensibly for the experimental UI, so that the font license would not encumber the code using the UI toolkit. That said, they did seem to put effort into making sure Go source code would look pretty.


Good question. Why does it need a mascot too at first place, I don't know either.


A mascot is just a type of logo, and logos definitely have their uses.




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

Search: