4 ms·
Sum/Product types. Generics/type-parameters. Bizarre handling of nil in places. Error handling that’s like some deliberately crippled version of a Result<T,E>.
by FridgeSeal 3y ago
Sum/Product types. Generics/type-parameters. Bizarre handling of nil in places. Error handling that’s like some deliberately crippled version of a Result<T,E>. The absolutely unhinged decision about zero-value-defaults for types. I’m sure other people can think of some more, but that’s the ones I can think of off the top of my head.
Non PL theory but related: incorrect implementation of monotonic clocks, and then refusing to fix it because “just use google smear time bro”.
- skybrian 3y agoEveryone who disagrees with you is “unhinged.” This is just name-calling.
- FridgeSeal 3y agoBut they’re like, genuinely wild decisions? Unhinged is a great description! The error design can return the value, or an error, or both, for some inexplicable reason and you can check it - or not - and if your function returned some indication of severe error, and you happen to not check it, you can totes just continue your program, in who knows what invalid state. Oh and also, because the devs are apparently deathly allergic to abstractions of apparently kind, you’ve got to do this janky little if err != nil check at. every. single. point. Which occludes your fundamentally important logic in pointless line noise, with zero opportunity for streamlining or improving the logic or guarantees.
- kiitos 3y agoGo definitely implements monotonic clocks correctly? https://pkg.go.dev/time#hdr-Monotonic_Clocks https://pkg.go.dev/time#hdr-Monotonic_Clocks
- FridgeSeal 3y agoIt definitely didn’t used to lol: https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-ride https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-...
- kiitos 3y agoThat article is so cringeworthy
- FridgeSeal 3y agoI disagree, but the style isn’t for everyone. However, that still doesn’t mean that it’s wrong.
- eviks 3y agoRather illustrative article, especially re the false simplicity where the language just silently does the wrong thing (though I disagree that ".ext" is not an extension of an empty base name)