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: signature.asc
Description: This is a digitally signed message part.

Reply via email to