3 ms·
If you wanted to have a parameter that gets filled in when there is an error, this exact issue will remain, it's completely unrelated to which language construc
by 59nadir 1y ago
If you wanted to have a parameter that gets filled in when there is an error, this exact issue will remain, it's completely unrelated to which language construct you use to capture errors and has more to do with having a good idea of how your errors are allocated, if they require allocation. I don't think the commenter in the GitHub issue thought this through at all, and probably didn't expect to have it be held up as some example of why you can't return tagged unions (because it's not an example of that, not even remotely).