3 ms·
You don't have to have generics to use enums for error handling any more than you need generics to use tuples for error handling. The thing you need is enums/al
by pcwalton 12y ago
You don't have to have generics to use enums for error handling any more than you need generics to use tuples for error handling. The thing you need is enums/algebraic data types/sum types.
See for example the first answer to this SO question on error handling in Swift, which doesn't use generics at all: http://stackoverflow.com/questions/24010569/error-handling-in-swift-language http://stackoverflow.com/questions/24010569/error-handling-i...