3 ms·
You can just as well use a nested common error struct which has more detailed error information instead of just an "is_valid" bool, and also turn the whole retu
by flohofwoe 6y ago
You can just as well use a nested common error struct which has more detailed error information instead of just an "is_valid" bool, and also turn the whole return value into a tagged union to save some space (so the return value either contains a success value, or error data, but not both).
You just don't have the high-level syntax sugar to create or deal with tagged unions in C.