RE: [PHP-DEV] not_null function

2014-07-06 Thread Robert Stoll
-Original Message- From: Pierre Joye [mailto:pierre@gmail.com] Sent: Saturday, July 05, 2014 10:06 AM To: Tjerk Meesters; PHP internals Subject: Re: [PHP-DEV] not_null function On Jul 5, 2014 9:43 AM, Tjerk Meesters tjerk.me esters a gmail.com wrote: Obviously spoke

RE: [PHP-DEV] not_null function

2014-07-06 Thread Robert Stoll
-Original Message- From: Kris Craig [mailto:kris.cr...@gmail.com] Sent: Saturday, July 05, 2014 3:22 AM To: Xen Cc: Levi Morrison; internals Subject: Re: [PHP-DEV] not_null function On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison

Re: [PHP-DEV] not_null function

2014-07-05 Thread Tjerk Meesters
On Sat, Jul 5, 2014 at 9:22 AM, Kris Craig kris.cr...@gmail.com wrote: On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available in Perl and I believe Perl had it first; not completely sure though. Okay, I

Re: [PHP-DEV] not_null function

2014-07-05 Thread Kris Craig
Currently, this is what's available for checking a variable's status without throwing any errors: Variable exists and !== NULL: isset( $var ) Variable === NULL or doesn't exist: !isset( $var ) Variable == NULL or doesn't exist: empty( $var ) Variable exists and != NULL: !empty( $var )

Re: [PHP-DEV] not_null function

2014-07-05 Thread Tjerk Meesters
On Sat, Jul 5, 2014 at 3:39 PM, Tjerk Meesters tjerk.meest...@gmail.com wrote: On Sat, Jul 5, 2014 at 9:22 AM, Kris Craig kris.cr...@gmail.com wrote: On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available in

Re: [PHP-DEV] not_null function

2014-07-05 Thread Pierre Joye
On Jul 5, 2014 9:43 AM, Tjerk Meesters tjerk.me esters a gmail.com wrote: Obviously spoke to soon ... what I've written there is basically an ugly `!isset($var)`. Totally fail to see what is ugly with is set or the difference with exists(). The latter, in the context of php (even more with

Re: [PHP-DEV] not_null function

2014-07-05 Thread Andrea Faulds
On July 5, 2014 at 9:05 AM Pierre Joye pierre@gmail.com wrote: On Jul 5, 2014 9:43 AM, Tjerk Meesters tjerk.me esters a gmail.com wrote: Obviously spoke to soon ... what I've written there is basically an ugly `!isset($var)`. Totally fail to see what is ugly with is set

Re: [PHP-DEV] not_null function

2014-07-04 Thread Andrey Andreev
HI, Not any that I'm aware of, and I personally have never used is_null(). I share your opinion that we don't really need is_null(), but with BC in mind, I don't think it would get removed. Cheers, Andrey. On Fri, Jul 4, 2014 at 1:47 AM, Kris Craig kris.cr...@gmail.com wrote: $var !== null

Re: [PHP-DEV] not_null function

2014-07-04 Thread Stas Malyshev
Hi! Not any that I'm aware of, and I personally have never used is_null(). I share your opinion that we don't really need is_null(), but with BC in mind, I don't think it would get removed. There's nothing to remove. Every type has is_* function, including null type. If is_null() is offensive

Re: [PHP-DEV] not_null function

2014-07-04 Thread Kris Craig
On Fri, Jul 4, 2014 at 12:26 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Not any that I'm aware of, and I personally have never used is_null(). I share your opinion that we don't really need is_null(), but with BC in mind, I don't think it would get removed. There's nothing to

Re: [PHP-DEV] not_null function

2014-07-04 Thread Mats Lindh
On Fri, Jul 4, 2014 at 9:43 AM, Kris Craig kris.cr...@gmail.com wrote: What would be wrong with changing it from a function to a language construct like isset() and empty()? If is_null() were the equivalent of !isset( $var ) || $var === NULL, it would make a hell of a lot more sense than

Re: [PHP-DEV] not_null function

2014-07-04 Thread Peter Cowburn
On 4 July 2014 08:43, Kris Craig kris.cr...@gmail.com wrote: On Fri, Jul 4, 2014 at 12:26 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Not any that I'm aware of, and I personally have never used is_null(). I share your opinion that we don't really need is_null(), but with BC

Re: [PHP-DEV] not_null function

2014-07-04 Thread Kris Craig
On Fri, Jul 4, 2014 at 12:57 AM, Mats Lindh mats.li...@gmail.com wrote: On Fri, Jul 4, 2014 at 9:43 AM, Kris Craig kris.cr...@gmail.com wrote: What would be wrong with changing it from a function to a language construct like isset() and empty()? If is_null() were the equivalent of !isset(

RE: [PHP-DEV] not_null function

2014-07-04 Thread Robert Stoll
Hey, -Original Message- From: Xen [mailto:x...@dds.nl] Sent: Thursday, July 03, 2014 11:40 AM To: internals@lists.php.net Subject: [PHP-DEV] not_null function Heya, I was just wondering about something. It seems way more natural and flowing to have and use a not_null

Re: [PHP-DEV] not_null function

2014-07-04 Thread Xen
Op Fri, 04 Jul 2014 14:34:17 +0200 schreef Robert Stoll p...@tutteli.ch: [Robert Stoll] I really like how ruby tackles this problem with the syntactic sugar unless which basically is a substitute for if( !() ). Maybe we could consider to introduce it in PHP next? It is very natural to read

Re: [PHP-DEV] not_null function

2014-07-04 Thread Levi Morrison
On Fri, Jul 4, 2014 at 2:27 PM, Xen x...@dds.nl wrote: Op Fri, 04 Jul 2014 14:34:17 +0200 schreef Robert Stoll p...@tutteli.ch: [Robert Stoll] I really like how ruby tackles this problem with the syntactic sugar unless which basically is a substitute for if( !() ). Maybe we could consider

Re: [PHP-DEV] not_null function

2014-07-04 Thread Xen
On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available in Perl and I believe Perl had it first; not completely sure though. Okay, I never used Perl. I don't think changing isset would be beneficial, sadly. I wish it only checked that a variable exists and didn't do the

Re: [PHP-DEV] not_null function

2014-07-04 Thread Kris Craig
On Fri, Jul 4, 2014 at 2:38 PM, Xen x...@dds.nl wrote: On Fri, 4 Jul 2014, Levi Morrison wrote: For completeness, it is available in Perl and I believe Perl had it first; not completely sure though. Okay, I never used Perl. I don't think changing isset would be beneficial, sadly. I