develooper Front page | perl.perl5.porters | Postings from November 2017

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Zefram
Date:
November 28, 2017 18:58
Subject:
Re: Revisiting smart match
Message ID:
20171128185805.GN4913@fysh.org
Father Chrysostomos wrote:
>I think I will continue to misread 'being' as 'it being', not as 'it
>being that', which gives it the wrong meaning.

Yes, that's a problem.  I'm pretty happy with "having", but less so with
"being".

>And we end up with 'when', which is often interchangeable with 'if'.

Working in that vein, "where" would be preferable to "when".  It's
similarly synonymous with "if", but avoids the temporal meaning that
makes "when" look as though it ought to have some special relationship
to "while" and "until".  But with either of these words I'm at a loss
to find a stylistically similar word for the smartmatching version.

>whenlike (I know, awful.)
>suppose

"whenlike" reads reasonably well, but fails on other aesthetic grounds.
"suppose" is grammatically unsuitable and doesn't get across the meaning
at all.

>Based on Eirik's comment, I think I like my 'beit' idea even more now,

I dislike it.  I see the benefit of the "it" particle, but the word is
ugly in the same kind of way as "whenlike".

More possibilities: "with" for smartmatching (do_stuff() with Number), and
"because" for condition (do_stuff() because $_ == 3).  These don't seem
stylistically related to each other, but they're individually appealing.
Pairing "with" with "where" could work.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About