Re: Unifying logical operators

From: Date: Tue, 10 Jul 2018 18:22:09 +0000
Subject: Re: Unifying logical operators
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-102723@lists.php.net to get a copy of this message
On Tuesday, July 10, 2018 6:09:22 AM CDT Christoph M. Becker wrote: > On 10.07.2018 at 11:01, Rowan Collins wrote: > > While I've not seen it used much in PHP code, the "do this or die" idiom > > is > > common in Perl (which also has post-fix "if" and "unless" modifiers, > > so > > those are a different feature again). > > It seems to me the “do this or die” idiom at least has been very common > in PHP. There may still be some occurences in the manual proper, and > definitely there are occurences in user contributed notes. "do() or die()" code is/was very common in example code, tutorials, and other intro material because it means you don't need to think about error handling. I haven't seen it in actual production code in about 14 yeas, I think, and anyone who tried submitting it would get their patch rejected so hard it would make their head spin. It's a terrible pattern outside of fly-by-night tutorials. --Larry Garfield

Attachment: [application/pgp-signature] This is a digitally signed message part. signature.asc
« previous php.internals (#102723) next »