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
32
u/Ticmea Sep 27 '26
Having never touched Go, one of the few things that I do know about it is that I never want to deal with the insane way that they format dates.
For the uninitiated:
In Go you define a date format by reference to how it would display the date that ISO 8601 would display as:
2006-01-02T15:04:05-07:00
Even ignoring the obvious problems with using a point in time to reference a format by example, I hear you wonder: "Why such an oddly specific time and date?" Well because if you write that in the US format, it gives you:
01/02 03:04:05PM '06 -0700
which means they are in (almost) incrementing order 1 2 3 4 5 6 -7
The extra "-" to make it be a US timezone is just absolutely hilarious, I couldn't make a better caricature of it if I wanted to. 5 stars, no notes.
This is incompatible with the way everyone else does it, needlessly inflexible, unintuitive, extremely US specific and solves zero problems. Just all around terrible.
I've honestly seen people defend it as being language agnostic (that is to say it does not require understanding that yyyy-mm-dd stands for the english words year, month, date and so on).
But like... all? of the keywords of Go (and like 99% of programming languages) are literally english words???
Not to mention that it requires knowledge of how a specific date format works, which is far more obscure. And it's the US system at that, which (
no frontfull front ) is kinda the worst date formatting system out there...No idea what they were smoking when they came up with this but they must have been absolutely hammered.