develooper Front page | perl.perl5.porters | Postings from February 2013

Re: Don't patch perlopentut: rewrite it completely

Thread Previous | Thread Next
Johan Vromans
February 18, 2013 07:22
Re: Don't patch perlopentut: rewrite it completely
Message ID:
"H.Merijn Brand" <> writes:

> /me is in favor of bringing back the dor (or err) keyword!

Yes, and no.

There's added value to a special token that connects two statements so
that the second is only executed when the first one returns undefined.
I'm not particulary charmed by 'dor' and 'err'. 'dor' is technical and
does not have a relation to a real live expression like the other
other keywords. 'err' is plain nonsense. 

The correct term we're looking for would be something similar to
'failing that, do'. But I must admit I can not come up with something
better. Perhaps 𝍐 (tetragram for 'failure')?

But isn't this a suitable job for a pluggable keyword?

  use Perl::Syntax::DefinedOr qw(dor);

-- Johan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About