Re: About SUCCESS/FAILURE
| From: | Stanislav Malyshev | Date: | Wed, 24 Dec 2014 04:49:01 +0000 |
| Subject: | Re: About SUCCESS/FAILURE | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79902@lists.php.net to get a copy of this message | ||
Hi!
> Hey:
>
> We use SUCCESS/FAILURE as return value in some APIs, but use
> 0/1(false/true) in others.
>
> I'd like to remove SUCCESS/FAILURE at all, use 0/1 instead..
>
> what do you think?
I think it would make reading code harder. Why do it - is there any
benefit in it? SUCCESS/FAILURE is a good way to indicate - well, success
and failure. Replacing it with meaningless numbers would make code
harder to read and harder to write without mistakes.
--
Stas Malyshev
smalyshev@gmail.com