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

Re: Revisiting smart match

Thread Previous | Thread Next
Father Chrysostomos
November 27, 2017 22:21
Re: Revisiting smart match
Message ID:
Zefram wrote:
> As an implementor, I'd be happy with separate keywords.  As a user,
> I'm unlikely to make much use of the switch keywords, so I'd like to
> hear from people who would use them often.

If we can make 'break' equivalent to 'next', then I will likely use
'when' frequently.  If we can make two separate keywords, I think I
will use it *very* frequently.  So I definitely support having separ-
ate keywords, as long as they are sufficiently memorable and not

'when' and 'upon' are near synonyms.  It may be confusing at first,
but I could get used to it.  I have no opinion on which should be
which, if we go that route.

Another suggestion, which may not be any good, is to use 'when'
for truth:

    when($quality eq 'so-so') { ... }

and 'beit' (be it) for smartmatch:

    beit(numerical) { ... }

In English, we already combine those two words in 'albeit'.

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