Re: [hackers] [PATCH] [ii] get rid of EXIT_bla crap

From: Markus Teich <>
Date: Fri, 14 Oct 2016 13:02:31 +0200

Laslo Hunhold wrote:
> Oh, and before you inform me. I know that OpenVMS has the roles
> inverted (exit(1) means success). However, there are two aspects we
> should keep in mind:
> 1) OpenVMS is not the most popular OS any more.
> 2) Using EXIT_* we cannot write reliable manuals, as we do
> use 0, 1, 2, ... there.


adding to that, when reading code with EXIT_bla, you don't know immediately how
it is defined. Therefore it can easily be confused when also using C-functions
which return 1 as "true" and 0 as "false". I get that abstracting the value away
and using a name instead can make sense, but when using `return` or `exit()`,
you don't have to give meaning to the `0` or `1` while in a line like `ret =
calloc(5 * sizeof(struct bla) + 7);` it is very helpful to know what those
numbers refer to semantically.

Received on Fri Oct 14 2016 - 13:02:31 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 14 2016 - 13:12:21 CEST