Comment Comment by psychoslave Doesn't even need two return values. One tagged union suffices: Result(double) x = strtod·or·error(s); if (!x.ok) { handle(x.error); return; } use(x.value); Which in real C, with no language support, is just: typedef struct { double value; int error; /* 0 = ok */ } maybe·double; maybe·double x = strtod·or·error(s, NULL); if (x.error) { /* handle */ } parent psychoslave 25 days ago