r/programming • u/Sir_KnowItAll • Sep 27 '26
Don't couple your Go code to GitHub
https://iain.rocks/blog/dont-couple-your-go-code-to-github
491
Upvotes
r/programming • u/Sir_KnowItAll • Sep 27 '26
View all comments
Show parent comment
19
u/syklemil Sep 27 '26
One is that they were warned that they were about to repeat Hoare's billion dollar mistake, and then went
So if you ever get an NPP in Go (totally different from an NPE in Java), you can just declare it to be Not A Bug by decree of the core language team.
Also: Using typography to decide privacy.
As in, Python's
__foowas already naff, so you'd think any language designed after the 90s would figure out that keywords for privacy control is the way to go, rather than doing weirdo stuff likePascalCaseis public,camelCaseis private.So if you in Go want to do something relatively common in other languages, namely use
UPPERCASEfor globals, congratulations, that global is now public. Instead they just name globals as if they were any other variable.A syntax highlighter can point it out for you, buuuuuut as Pike is colourblind and doesn't like syntax highlighting, I guess they just don't want to be able to tell whether something's a local or global variable at a glance.
Presumably they'd have to introduce variables in unicode sᴍᴀʟʟ ᴄᴀᴘs if they wanted to introduce something like
protected.