5 ms·
> A powerful motivation for adding generic types to Go is to enable programmers to adopt a monadic error handling pattern. That has never been my impression. T
by hota_mazi 9y ago
> A powerful motivation for adding generic types to Go is to enable programmers to adopt a monadic error handling pattern.
That has never been my impression. The main drive for generics is safer code, period. It doesn't necessarily translate to a different way of handling errors (Java and Kotlin mostly use exceptions despite supporting parametric polymorphism).
Rejecting generics because they would force a switch to monadic error handling is completely misunderstanding the value of generics, a sentiment that seems to be widespread in the Go community.