i love c but man a result type like in rust or zig error unions would be so much nicer
@rfleury hmm say I did the classic put pointer with an error return and set the image to zero or something then the user would have to handle the failure somewhere no? Like if they didn't check the error and come back to me with a zero image I would just have to return a new error??
@lemire why?
@NotNordgaren lmao if you go search my twitter media tab you will find a macro implemenatation of rust result type I did like 2 years ago or smth
@xadh I actually have them namespaced in my actual code just removed them for the twitter post the image type is actually called mylib_image_t for example
@barettorein Yeah but then this would be a lot less ergonomic to use in other places that expect a c api and then the user has to wrap this in basically the same thing I did
@NyxXeres sooo much stuff I have type for every function that can fail tho
@_opeolluwa well I would use that if I could use c++ and that too c++23(I think I'm not sure when it released) but this is a wrapper c api for other languages/ffi to consume

