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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
November 29, 2017 16:46
Subject:
Re: Revisiting smart match
Message ID:
20171129164647.GA6254@debian
* Father Chrysostomos <sprout@cpan.org> [2017-11-29T09:20:11]
> Ricardo Signes wrote:
> >   given ($x) {                         
> >     when   ($matcher) { ... }
> >     ifcase ($_ > 100) { ... }
> >   }
> 
> I could live with 'when' and 'where'.  We often say things like 'Take
> them out when done, when golden-brown' but such phrases are less com-
> mon with 'where' (though not entirely uncommon: 'where possible').

I think the distinction between "when" and "where" in this sense is paper-thin,
especially for a non-native speaker.  Why is "where" boolean expr and "when" a
matcher?  "Historical reasons" only justifies "when."

Something with "if" in it says "this is like if" and the "case" says "but it's
part of a switchy thing."

-- 
rjbs

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