On Sat, Dec 27, 2014 at 4:45 AM, Pierre Joye pierre@gmail.com wrote:
On Dec 26, 2014 7:42 PM, Xinchen Hui larue...@php.net wrote:
Hey:
On Fri, Dec 26, 2014 at 7:54 PM, Andrea Faulds a...@ajf.me wrote:
On 26 Dec 2014, at 05:57, Levi Morrison le...@php.net wrote:
On Thu,
On 26 Dec 2014, at 05:57, Levi Morrison le...@php.net wrote:
On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner m...@php.net wrote:
There's already ZEND_RESULT_CODE, or did I miss anything?
According to lxr.php.net, this symbol ZEND_RESULT_CODE is not
referenced in any place except its
Hey:
On Fri, Dec 26, 2014 at 7:54 PM, Andrea Faulds a...@ajf.me wrote:
On 26 Dec 2014, at 05:57, Levi Morrison le...@php.net wrote:
On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner m...@php.net wrote:
There's already ZEND_RESULT_CODE, or did I miss anything?
According to lxr.php.net, this
On Fri, Dec 26, 2014 at 5:42 AM, Xinchen Hui larue...@php.net wrote:
Hey:
On Fri, Dec 26, 2014 at 7:54 PM, Andrea Faulds a...@ajf.me wrote:
On 26 Dec 2014, at 05:57, Levi Morrison le...@php.net wrote:
On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner m...@php.net wrote:
There's already
On Dec 26, 2014 7:42 PM, Xinchen Hui larue...@php.net wrote:
Hey:
On Fri, Dec 26, 2014 at 7:54 PM, Andrea Faulds a...@ajf.me wrote:
On 26 Dec 2014, at 05:57, Levi Morrison le...@php.net wrote:
On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner m...@php.net wrote:
There's already
There's already ZEND_RESULT_CODE, or did I miss anything?
On 25 Dec 2014 06:45, Xinchen Hui larue...@php.net wrote:
Hey:
On Thu, Dec 25, 2014 at 12:38 PM, Pierre Joye pierre@gmail.com
wrote:
On Thu, Dec 25, 2014 at 3:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 23:53,
On Fri, Dec 26, 2014 at 8:33 AM, Michael Wallner m...@php.net wrote:
There's already ZEND_RESULT_CODE, or did I miss anything?
Yes, to read the thread :)
We are not talking about the lack of a status typedef but about the
inconsistencies across PHP internal APIs. And what Xinchen suggests
below
On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner m...@php.net wrote:
There's already ZEND_RESULT_CODE, or did I miss anything?
According to lxr.php.net, this symbol ZEND_RESULT_CODE is not
referenced in any place except its definition. We can begin using it
if we like, or even rename it.
Hey:
On Fri, Dec 26, 2014 at 5:33 AM, Michael Wallner m...@php.net wrote:
There's already ZEND_RESULT_CODE, or did I miss anything?
yes,
we were talking about use ZEND_RESULT_CODE as return type hinting for
those functions use SUCCSS/FAILURE ..
furthermore, maybe we could use it as all
Hey:
On Wed, Dec 24, 2014 at 3:38 PM, Stanislav Malyshev smalys...@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 can not agree with that since nowdays, false === 0,
On Wed, Dec 24, 2014 at 3:57 PM, Pierre Joye pierre@gmail.com wrote:
On Dec 24, 2014 2:38 PM, Stanislav Malyshev smalys...@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
On Wed, Dec 24, 2014 at 7:53 PM, Xinchen Hui larue...@php.net wrote:
On Wed, Dec 24, 2014 at 3:57 PM, Pierre Joye pierre@gmail.com wrote:
On Dec 24, 2014 2:38 PM, Stanislav Malyshev smalys...@gmail.com wrote:
Hi!
But: return 0 and return FAILURE... which is simpler?
It's equally
On Wed, 2014-12-24 at 05:06 +, Andrea Faulds wrote:
typedef enum _zend_success {
FAILURE = 0,
SUCCESS = 1
} zend_success;
mysqlnd uses a enum for that already. See
http://lxr.php.net/xref/PHP_TRUNK/ext/mysqlnd/mysqlnd_enum_n_def.h#139
If a PHP-wide thing is introduced this should
On Dec 24, 2014 8:41 PM, Johannes Schlüter johan...@schlueters.de wrote:
On Wed, 2014-12-24 at 05:06 +, Andrea Faulds wrote:
typedef enum _zend_success {
FAILURE = 0,
SUCCESS = 1
} zend_success;
mysqlnd uses a enum for that already. See
Hmm. This thread doesn't seem to mention it, but why must failure be
negative? I understand the non-zero part but not negative. Aside from
the fact we probably have code relying on it to be negative at this
point is there some other reason?
--
PHP Internals - PHP Runtime Development Mailing List
On 24 Dec 2014, at 17:22, Levi Morrison le...@php.net wrote:
Hmm. This thread doesn't seem to mention it, but why must failure be
negative? I understand the non-zero part but not negative. Aside from
the fact we probably have code relying on it to be negative at this
point is there some
On Wed, Dec 24, 2014 at 10:34 AM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 17:22, Levi Morrison le...@php.net wrote:
Hmm. This thread doesn't seem to mention it, but why must failure be
negative? I understand the non-zero part but not negative. Aside from
the fact we probably have
On Dec 25, 2014 1:13 AM, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 10:34 AM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 17:22, Levi Morrison le...@php.net wrote:
Hmm. This thread doesn't seem to mention it, but why must failure be
negative? I understand the
On 24 Dec 2014, at 18:13, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 10:34 AM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 17:22, Levi Morrison le...@php.net wrote:
Hmm. This thread doesn't seem to mention it, but why must failure be
negative? I understand the
On Wed, 2014-12-24 at 11:13 -0700, Levi Morrison wrote:
I'm asking for specific things. The reason is that some API's do a
non-zero error code; the fact that they are negative is a detail that
we should not need to care about.
My guess is that positive values more often might have a meaning
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On Wed, 2014-12-24 at 11:13 -0700, Levi Morrison wrote:
I'm asking for specific things. The reason is that some API's do a
non-zero error code; the fact that they are negative is a detail that
we should not need
On 24 Dec 2014, at 23:53, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On Wed, 2014-12-24 at 11:13 -0700, Levi Morrison wrote:
I'm asking for specific things. The reason is that some API's do a
non-zero error code;
Hey:
On Thu, Dec 25, 2014 at 12:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 23:53, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On Wed, 2014-12-24 at 11:13 -0700, Levi Morrison wrote:
I'm asking for
On Thu, Dec 25, 2014 at 3:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 23:53, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On Wed, 2014-12-24 at 11:13 -0700, Levi Morrison wrote:
I'm asking for specific
On Thu, Dec 25, 2014 at 3:34 PM, Xinchen Hui larue...@php.net wrote:
Hey:
On Thu, Dec 25, 2014 at 12:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 23:53, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On
Hey:
On Thu, Dec 25, 2014 at 12:38 PM, Pierre Joye pierre@gmail.com wrote:
On Thu, Dec 25, 2014 at 3:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 23:53, Levi Morrison le...@php.net wrote:
On Wed, Dec 24, 2014 at 4:27 PM, Johannes Schlüter
johan...@schlueters.de wrote:
On
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?
thanks
--
Xinchen Hui
@Laruence
http://www.laruence.com/
--
PHP Internals - PHP Runtime Development Mailing
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
Hey
On Dec 24, 2014, at 12:49 PM, Stanislav Malyshev smalys...@gmail.com wrote:
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
Hi!
I think if(func()) is better, more readeable than if(func() == success)
Not really, especially given the fact that for major part of libc
if(func()) means checking for error, not for success, as success value is 0.
--
Stas Malyshev
smalys...@gmail.com
--
PHP Internals - PHP Runtime
On Dec 24, 2014, at 12:55 PM, Xinchen Hui larue...@gmail.com wrote:
Hey
On Dec 24, 2014, at 12:49 PM, Stanislav Malyshev smalys...@gmail.com wrote:
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
On 24 Dec 2014, at 03:25, Xinchen Hui larue...@php.net wrote:
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?
thanks
Hi,
Honestly, I don’t think
Hey:
thanks, that is the first thought of mine too.
On Wed, Dec 24, 2014 at 1:06 PM, Andrea Faulds a...@ajf.me wrote:
On 24 Dec 2014, at 03:25, Xinchen Hui larue...@php.net wrote:
Hey:
We use SUCCESS/FAILURE as return value in some APIs, but use
0/1(false/true) in others.
I'd
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.
--
Stas Malyshev
smalys...@gmail.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
On Dec 24, 2014 2:38 PM, Stanislav Malyshev smalys...@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
35 matches
Mail list logo