News for hackers. Stuff that matters.
Re:C’s Biggest Mistake by signa11 on Sunday July 02, 2023 @09:02PM (#36567502)
> 1. In a world without templates/generics, you have to manually define a different such struct for every possible return type. Can be macro'd at the function definition, but it's ugly.

one trivial possibility/option is to define in-out parameters, and just return errors:

    <error-type/int/…> foo(T*, <params>)
will that not be ok ?

There are no comments on this comment yet.