It almost feels like the creators of go are taunting us peasant devs: “here’s a union type. but you can’t use it, it’s only for operators, so a handful of number functions that we already added to the core lib. fuck you.”
You can actually use the switch any(v).(type) hack together with the pipe operator. It’s just almost never useful.
Obviously, this is true, but this reopened the scars we all carry due to Go not having actual sum types.
It almost feels like the creators of go are taunting us peasant devs: “here’s a union type. but you can’t use it, it’s only for operators, so a handful of number functions that we already added to the core lib. fuck you.”
You can actually use the switch any(v).(type) hack together with the pipe operator. It’s just almost never useful.