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

Re: Revisiting smart match

Thread Previous | Thread Next
December 18, 2017 02:38
Re: Revisiting smart match
Message ID:
Eirik Berg Hanssen wrote:
>  upon/uponif?  (Or shorter, on/onif?)

"upon" shows some promise.  It reads well, and could serve as either of
the keywords.  But "uponif" is poor.  "on" also reads well on its own,
but has the same issue with "onif".  These also need to be checked
against Moose; "on" is fairly likely to be used by a popular CPAN module.

>  I'm even less enthusiastic about the "if" form.  "do_stuff() uponif Int"
>/ uponif (Int) { do_stuff(); }".  It doesn't really read well.

"Int" isn't a realistic condition.  It would be "do_stuff() uponif $a ==
$b", which also reads poorly.

"upon" combines a bit better with "so": "do_stuff() uponso $a == $b".
But that's still not great.  Generally, if we want something reading
well as English, it's going to be easier to add "so" than to add "if".


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