Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

well, i guess in C you should return a value indicating the error probably via a struct that contains the error and the success data. C programmers seem to have a terrible aversion to returning structs (possibly they don't realise that you can do it?) where in other value-based languages (e.g. c++, go) it is very common.

of course, there are reasons for mucking around with pointers. but down that route lies pointers-to-pointers, and eventually madness.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: