Perl's lack of 'in' keyword

Jonathan Stowe jns at integration-house.com
Wed Oct 8 15:13:45 BST 2008


2008/10/8 Nigel Rantor <wiggly at wiggly.org>:

>
> If anyone comes back and tell me that they think ~~ scans nicely in english,
> is easier to type and provides a better, clearer explanation of what it does
> in code than 'in' I will say no more on the subject because we would just be
> dealing with a huge gulf in our mental models of the world.
>

'~~' is not exactly the same as 'in' - it is 'smart match' and I'm
guessing it was chosen because of its similarity to '=~' which
everyone thinks of as 'match'.  I would hazard that finding a single
short unambiguous English word that would do instead might be
problematic.  If you need to say or think it out loud then "smart
match" is fine.

"If you want COBOL you know where to find it"


More information about the london.pm mailing list