2,329 karma · joined Mar 14, 2016 (10y ago) · 328 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
Relying on such upgrades sort of introduces a dark and fuzzy part of the API. Go’s http pkg is a notorious one, with how a http.ResponseWriter can also be a Flusher and Hijacker and I don’t know what else. If you in your middleware want to wrap it, you need to implement those interfaces as well, or the functionality is lost. But they’re not part of the “visible” API, they’re type assertions buried deep in the standard library, good luck with that. For this reason Go 1.20 introduced the http.ResponseController.
comment 2y ago · link · parent
comment 2y ago · link · parent
[1]: https://en.m.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93...
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Then I'm afraid that either the author is not familiar with the standard library, or that it is not built according the "best practices".
Rant: the phrase "best practice" increasingly irritates me. Basically it has become a synonym for "my own opinion just trust me". It's like the Jedi hand gesture to force your beliefs onto someone to end a discussion.
comment 2y ago · link · parent
comment 2y ago · link · parent
Although the HN ranking algo is mysterious, this is different from how it typically works in my experience.
comment 2y ago · link · parent
In a proper functioning democracy at least the prime minister should know what intelligence services are up to. As those politicians are ultimately responsible. It’s not that intelligence services are independent lawless sub-states.
comment 2y ago · link · parent
149.
Dutch spy released Stuxnet in Iranian facility(volkskrant.nl ↗)
8 points · by rollulus · 2y ago · 1 comment