|
|
|
|
|
by kilink
3672 days ago
|
|
> The problem usually is: What is the error code if your return type is int? Sure, you can define all negative ints as errors, or you provide a reference which is set when an error is encountered and so on, but that ends up being just another type of "very ugly". Many languages support multiple return values, algebraic data types, or box types, allowing you to return an error value out of band. |
|