Pattern matching: Difference between revisions

Content deleted Content added
Ruby also has a "case" statement for pattern matching.
a 1970 pattern matcher in Lisp is pretty late and not notable; fix chronology -- why was QED before COMIT??
Line 15:
==History==
{{Expand section|date=May 2008}}
Early programming languages with pattern matching constructs include [[COMIT]] (1957), [[SNOBOL]] (1962), [[Refal]] (1968) with tree-based pattern matching, [[Prolog]] (1972), [[SASL programming language|SASL]] (1976), [[NPL programming language|NPL]] (1977), and [[Kent Recursive Calculator|KRC]] (1981).
 
Many [[text editor]]s support pattern matching of various kinds: the [[QED (text editor)|QED editor]] supports [[regular expression]] search, and some versions of [[TECO (text editor)|TECO]] support the OR operator in searches.
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 |access-date=2007-04-14 |url-status=dead |archive-url=https://web.archive.org/web/20070203111451/http://www.cs.nott.ac.uk/~ctm/view.ps.gz |archive-date=2007-02-03 }}</ref>
 
[[Computer algebra system]]s generally support pattern matching on algebraic expressions.<ref>Joel Moses, "Symbolic Integration", MIT Project MAC MAC-TR-47, December 1967</ref>
 
{{See also|Regular expression#History}}