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

Re: Revisiting smart match

Thread Next
From:
Morse, Richard E.,MGH
Date:
December 7, 2017 16:21
Subject:
Re: Revisiting smart match
Message ID:
F061B894-0EDB-4806-9A6C-CBF6635F979E@mgh.harvard.edu
Hi! I don’t subscribe to the list, however the topic of smartmatch came up  
in the weekly summary, and I wanted to (if I may) weigh in, because  
smartmatch is an issue that I care about.

Well, care about in a particular way.

So far, the discussions I have seen via the web portal don’t mention one of  
the primary uses I have for smartmatch: acting as an ‘in’ operator.

I have lots of code that looks like:

	if ($foo ~~ [ ‘opt1’, ‘opt2’ ]) {
		…
	}

Or:

	given ($path) {
		when (‘/‘) {
			…
		}

		when ([‘a’, ‘b’]) {
			…
		}
	}

As you are updating smartmatch, please make sure that it still functions  
this way.

Many thanks,
Ricky Morse


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

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