3 ms·
OTOH, I think is part of the point: > file, err = os.Open("file.txt") > if err != nil { > ... handle error ... A type system with generics can use types
by gclaramunt 12y ago
OTOH, I think is part of the point:
> file, err = os.Open("file.txt")
> if err != nil {
> ... handle error ...
A type system with generics can use types to make an error a different type and produce a compile error if you don't handle the case without making the code more complex.