RE: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-21 Thread Thomas Punt
Hey Dan, > Making it easier to write bad (imo) code does > not seem a good reason for a change. The point of this language feature isn't to promote or simplify the creation of bad code. Developers can (and will) misuse any feature to write poor code. The aim of this RFC is to enable developers

Re: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-21 Thread Dan Ackroyd
On 21 February 2015 at 07:20, Markus Fischer wrote: > On 21.02.15 06:11, Thomas Punt wrote: > From the RFC: >> Also, it will make empty() more inline with the not-too-disimillar isset(), > > Here I disagree. > > I would have assumed from the start that empty() would only return true > if *all* of

RE: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-21 Thread Thomas Punt
// Sorry, having email formatting problems still. Hopefully this one will be more legible. Hey Markus, > From the RFC: > > This behaviour seems to be the most prevalent usage of multiple empty > checks in a condition, therefore benefitting the most end users. > > Here I disagree. > > I would hav

RE: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-21 Thread Thomas Punt
Hey Markus, > From the RFC: > > This behaviour seems to be the most prevalent usage of multiple empty > checks in a condition, therefore benefitting the most end users. > > Here I disagree. > > I would have assumed from the start that empty() would only return true > if *all* of the ent

RE: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-21 Thread Thomas Punt
Hey Leigh, > Hey Tom, > > Patch looks solid (basically the same as the isset logic with OR > instead of AND). I think it's fairly sane to have this feature because > it compliments isset functionality (although I dislike "empty" > personally - consistency is nice) > > No RFC would be complete wi

Re: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-20 Thread Markus Fischer
On 21.02.15 06:11, Thomas Punt wrote: > Hello Internals! > The following RFC aims to make empty() have a variable arity: > https://wiki.php.net/rfc/variadic_empty. This is a simple feature that > enables for a short-hand notation of checking multiple expressions for > emptiness (which is a prett

Re: [PHP-DEV] [RFC] Make empty() a Variadic

2015-02-20 Thread Leigh
Hey Tom, Patch looks solid (basically the same as the isset logic with OR instead of AND). I think it's fairly sane to have this feature because it compliments isset functionality (although I dislike "empty" personally - consistency is nice) No RFC would be complete without a complaint about nami

[PHP-DEV] [RFC] Make empty() a Variadic

2015-02-20 Thread Thomas Punt
Hello Internals! The following RFC aims to make empty() have a variable arity: https://wiki.php.net/rfc/variadic_empty. This is a simple feature that enables for a short-hand notation of checking multiple expressions for emptiness (which is a pretty common thing to do). I have avoided including