Pattern matching: Difference between revisions

Content deleted Content added
TobyK (talk | contribs)
Ocaml example of tree pattern matching
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 7 templates: hyphenate params (3×);
Line 15:
{{Expand section|date=May 2008}}
 
The first computer programs to use pattern matching were text editors.{{citation needed|reason=obviously, the first programs doing pattern matching, even if ad hoc would have been compilers which came long before interactive text editors|date=November 2011}} At [[Bell Labs]], [[Ken Thompson (computer programmer)|Ken Thompson]] extended the seeking and replacing features of the [[QED (text editor)|QED editor]] to accept [[regular expression]]s. Early programming languages with pattern matching constructs include [[SNOBOL]] from 1962, [[USSR|Soviet]] language [[Refal]] from 1968 with tree-based pattern matching, [[SASL programming language|SASL]] from 1976, [[NPL programming language|NPL]] from 1977, and [[Kent Recursive Calculator|KRC]] from 1981. Another programming language with tree-based pattern matching features was Fred McBride's extension of [[LISP]], in 1970.<ref>{{cite web |url=http://www.cs.nott.ac.uk/~ctm/view.ps.gz |title=Archived copy |accessdateaccess-date=2007-04-14 |url-status=dead |archiveurlarchive-url=https://web.archive.org/web/20070203111451/http://www.cs.nott.ac.uk/~ctm/view.ps.gz |archivedatearchive-date=2007-02-03 }}</ref>
 
{{See also|Regular expression#History}}