← Back to context

Comment by wannabe44

13 hours ago

I know about slices module. But GP is not happy about generics apparently.

I think your error solution is good. But still it's a poor imitation of Exceptions wherein you have to capture the stack trace manually, possibly incuring a perf hit (haven't measured), and write handling code in every layer. Made worse by the fact that people return desperate errors for even precondition violations which should be panics.