View Single Post
Old 07-22-2011, 05:07 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,481
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by lousignolo View Post
Lol. I know, for many years, that I should learn Python ... but I never began .
Time for a small rant.

Regular expressions are not programming. Instead, they are a linguistic tool for describing a certain class of languages called (amazingly enough) regular languages, described in (or around) 1956 by Kleene as regular sets and by Chomsky as regular grammars. Regular expressions were not used generally in computing until the late 60s, when Ken Thomson added them to the editor QED as a way to describe patterns in text. They 'took off' a few years later when he used them in the Unix editor ed, then emacs, grep, sed, awk, vi, etc.

Asserting that regular expressions are programming is equivalent to saying that sentence diagramming is programming. Both REs and diagramming describe language patterns and ways of matching expressions in a language to a pattern. Programs describe a sequence of steps a computer is to use to solve a problem. Programs can (and are) written that use regular expression 'rules' to solve problems. Programs are also written that use accounting rules to solve accounting problems, but clearly accounting is not programming. Same for regular expressions.

I am not saying that regular expressions are not complex. They are. Regular expressions are formal, in the sense that the mathematics behind them are precise. Understanding the mathematics doesn't come easy to everyone, just as understanding the mathematics behind GPS doesn't come easy to everyone (or perhaps almost anyone), but that complexity does not convert either regular expressions or the mathematics behind GPS into programming.
chaley is offline   Reply With Quote