Re: About SUCCESS/FAILURE

From: Date: Wed, 24 Dec 2014 07:57:59 +0000
Subject: Re: About SUCCESS/FAILURE
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-79911@lists.php.net to get a copy of this message
On Dec 24, 2014 2:38 PM, "Stanislav Malyshev" <smalyshev@gmail.com> wrote: > > Hi! > > > But: return 0 and return FAILURE... which is simpler? > > It's equally simple to write, but FAILURE of course is way simpler to > understand when read. I totally agree. I do not care much about the value of failure or success but I am tired to have to read the code to see if it is 0, 1, or -1 on failure. The kind of uniformization I would like to see for the php internals APIs. About the argument for the lack of info in function signature: A simple typedef will solve it, for the good: status php_foo(); Or something along this line. Yes, it will mean yet another large set of changes for ext developers. But at this point, it may be a good time to do it. Cheers, Pierre

« previous php.internals (#79911) next »