Talk:Pattern matching

message: :"Pattern matching failure can often be ascribed to a type signature that is not strong enough or is incorrect."
I took that out because although I can imagine type signature can be blamed, I'm not at all assured that's a frequent or even reasonable cause. At least in Haskell, pattern type and expression type are statically checked to match. Perhaps if the type of a function is Maybe Integer -> Integer but giving Nothing as argument causes a matching failure, so the point would be the type should actually be Integer -> Integer? --82.181.66.63 10:32, 18 August 2005 (UTC)
thread_title:  Typing failure 

message: Contents at the moment:
#Primitive patterns
#Tree patterns
#Filtering data with patterns
#Pattern matching in Mathematica
##Declarative programming
#Pattern matching and strings
##Tree patterns for strings
##Example string patterns
Contents from a previous version by Kevin:
#Primitive patterns
#Structure patterns
#Pattern matching for user-defined types
#Extracting data with patterns
#Patterns for declarative programming
#Pattern matching and Strings
Stuff I'd want to cover:
*Important uses: function definitions, filtering and extraction, replacing (==rewriting?)
*Languages: SNOBOL, Perl?, Mathematica, Haskell
*Patterns: primitives, combination, regexes, trees, advanced features
*History of pattern matching
Some of the language stuff can go to language-specific articles and some of the pattern stuff could go to a separate article about patterns if there are a lot of general features to discuss. --TuukkaH 16:57, 21 September 2005 (UTC)
thread_title:  Section structure 

message: Am I wrong in thinking pattern matching is used in AI? It doesn't seem to be mentioned on the page at all. 
I'm thinking of the syntax matching Parry did, when he converted sentences into basic syntax forms. Thanks,
--Elín 23:08, 13 January 2007 (UTC)
thread_title:  AI 

message: Pattern-matching is used by the human brain - it is one of our greatest strengths. One of the first things a baby masters is the visual tracking of human faces. But this article only mentions pattern-matching from the computer standpoint. Grassynoel 09:03, 16 September 2007 (UTC)
thread_title:  Scope too narrow 

message: I've added a hatnote indicating this article (currently) concerns itself with pattern matching in functional programming languages, even though the lead does not accurately reflect this. "Pattern matching" is often used as a synonym for string matching and especially pattern recognition. Perhaps this should be turned into a disambiguation page instead? —Ruud 12:02, 7 March 2012 (UTC)
thread_title:  Disambiguation page 

message: Hello fellow Wikipedians,
I have just modified 8 external links on Pattern matching. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20070203111451/http://www.cs.nott.ac.uk/~ctm/view.ps.gz to http://www.cs.nott.ac.uk/~ctm/view.ps.gz
*Added archive https://web.archive.org/web/20170409021442/http://www.reouterhelpsupport.com/arris-customer-service.php to http://www.reouterhelpsupport.com/arris-customer-service.php
*Added archive https://web.archive.org/web/20110711112227/http://pure-lang.googlecode.com/svn/docs/pure-intro/pure-intro.pdf to http://pure-lang.googlecode.com/svn/docs/pure-intro/pure-intro.pdf
*Added archive https://archive.is/19990225161739/http://www.haskell.org/development/views.html to http://www.haskell.org/development/views.html
*Added archive https://web.archive.org/web/20060304053330/http://wwwhome.cs.utwente.nl/~tina/apm/applPatts.pdf to http://wwwhome.cs.utwente.nl/~tina/apm/applPatts.pdf
*Added archive https://archive.is/20130630081135/http://www.showtrend.com/ to http://www.showtrend.com/
*Added archive https://web.archive.org/web/20060211020429/http://cm.bell-labs.com/cm/cs/who/dmr/qed.html to http://cm.bell-labs.com/cm/cs/who/dmr/qed.html
*Added archive https://web.archive.org/web/20090822225301/http://www.cs.nyu.edu/leunga/prop.html to http://www.cs.nyu.edu/leunga/prop.html
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 15:51, 3 September 2017 (UTC)
thread_title:  External links modified 

message: The article seems to be languishing and does not provide an overview of pattern matching is modern languages, where a common set of functionality is emerging -- it references a bunch of these (Scala, F#, Haskell) but the examples are too ML- and Mathematica-centric, and the Haskell example is hard to follow. Gvanrossum (talk) 04:32, 16 June 2020 (UTC)
thread_title:  This is just terrible 

message: As it stands now (and as has been mentioned several times over the years on this very talk page) the article is a bit schizophrenic.
* On one hand, this is currently the main article of :Category:Pattern matching (think approximate string matching, diff, escape characters, metacharacter, wildcard characters etc., with :Category:Regular expressions and :Category:String matching algorithms as sub-categories).
* On the other hand, the article is in the categories :Category:Conditional constructs and :Category:Functional programming, and most of the article body talks about pattern matching as it is used in a variety of programming languages  as a language construct for conditional execution. That's mostly in programming languages with built-in support for algebraic data types, especially sum types, and (for historical reasons?) that's mostly functional programming languages, though Rust for example has match, and there are proposals to add pattern matching for std::variant that was introduced with C++17.
So, perhaps it would be a good idea to split off most the article body into a separate article, e.g. named Pattern matching (programming languages) or Pattern matching (conditional)? – Tea2min (talk) 13:46, 30 November 2020 (UTC)
replies: text: This article already has a disambiguation hatnote that explains that this article is about pattern matching in functional programming languages. Pattern matching in strings is also known as "string matching." Jarble (talk) 01:05, 28 May 2021 (UTC)
replies: text:  Well, yes. I guess what I am trying to say is that "pattern matching in functional programming languages" may not the primary topic for the term "pattern matching", and furthermore, there is a whole section in the article talking about Pattern matching and strings ("By far the most common form of pattern matching involves strings of characters. ..."), so the article is not exclusively about pattern matching in functional programming languages. (Perhaps it's just that I find it confusing that big parts of the article talk about Mathematica.) – Tea2min (talk) 06:11, 28 May 2021 (UTC)
thread_title:  Split article?