Hacker News new | ask | show | jobs
by wruza 1660 days ago
What do you think of

  T get_t(int how, char **error);
  int get_val(T *v);
One could rewrite these as

  struct get_t_res {T; char *};
  struct get_t_res get_t(int);

  struct get_val_res {int; T};
  struct get_val_res get_val();
But what do you think of it?
1 comments

Less clear. I much prefer for functions to do what's on the tin in the most simple way possible.