Re: Implicit isset/isempty check on short-ternary operator

From: Date: Sat, 23 Apr 2011 13:35:53 +0000
Subject: Re: Implicit isset/isempty check on short-ternary operator
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-51994@lists.php.net to get a copy of this message
On Sat, Apr 23, 2011 at 1:21 PM, Hannes Landeholm <landeholm@gmail.com>wrote: > I was planning on replying to the "coalesce" suggestion but you really took > my concerns and stated them much better than I could have myself, plus a > couple of other concerns I didn't even think about. > > To respond to Arpad Ray's statement: > > "To elaborate, I'd probably think this code was an unlikely series of > typos, > or an encoding error:" > > In my opinion that's a good thing. Then you might actually look it up in > the > documentation instead of making the assumption that the syntax has > function-like properties just because it looks like a function. For > example, > it took me at least 1 year from first encountering empty() until > understanding that it's not a normal function and actually a language > construct that suppresses unset notices. And I'm a pretty seasoned > programmer. There's only one thing worse than magic: hidden magic. > > and we should try to avoid adding more magic where we can. Tyrael

« previous php.internals (#51994) next »