Perl's lack of 'in' keyword
wiggly at wiggly.org
Wed Oct 8 16:22:20 BST 2008
Jonathan Stowe wrote:
> 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.
Yes, I saw Andy's previous post.
One of the things I like about perl is the fact that we have nice names
for things in addition to the concise versions, how's about an english
name for smart matching in addition to the ~~ operator? (can't we all
just get along, etc)
> "If you want COBOL you know where to find it"
No I don't, but google could probably help me.
More information about the london.pm