Name: Anonymous 2020-06-17 13:42
Gotards in 2020: generics are still the devil, but at least we are not retarded.
https://blog.golang.org/generics-next-step
https://blog.golang.org/generics-next-step
(string, err). so that must mean Go has some notion of tuples, right? And I can use multi-valued expressions in other contexts? Haha, no.
for i, v := range {}loop seems nice, how do I get my data structure to implement that? Can't. Okay.
if err != nilboilerplate everywhere? Can't. Okay… how do I ensure that errors aren't ignored by mistake? Can I use an option type and force callers to handle every case? Nope: the type system is just too nerfed and broken.
panic/
recoverwhich is like… the same fucking thing
error.Errorf("File not found: %s", path)forcing clients to parse a string instead of returning a proper struct.