2 ms·
First off - not the original poster, and an amateur linguist at best. > So the use of recursion makes the language less powerful because it isn't close to writ
by silentbicycle 16y ago
First off - not the original poster, and an amateur linguist at best.
> So the use of recursion makes the language less powerful because it isn't close to writing a human language (recursion is pretty relevant to a lot of activities, whether you realize it or not, but I'll play along)?
What I think the poster above means is that there usually isn't a great deal of recursion in typical human languages. While I've only studied a couple, I remember hearing a cliche of an absentminded German professor whose lecture ends in dozens of infinitive-form verbs. In German, subclauses tend to move their verb to the end, vaguely like, "Earlier today, I was with my old roommate downtown pad thai and Thai iced tea drinking eating driving talking." (But less silly. College German was a while ago.) So if someone keeps going off on tangents, the infinitive (getrunken, gesprachen, etc.) verbs could just keep stacking higher and higher.
Beyond a fairly shallow depth, such nesting is pretty uncommon, certainly compared to the sort of nesting that commonly occurs in Lisp. IIRC, Chomsky (or perhaps someone summarizing him) noted that human language usually doesn't go much deeper than three levels of recursion. (I guess after that point, languages risk smashing the stack?) That's probably what the poster above is referencing - While recursion adds a lot of expressiveness to language (much like induction adds to mathematical reasoning), it tends to be used in a fairly limited fashion. (Besides...people who have several levels of parenthesis in their writing? (Nerds. (Ha!)))
Incidentally, some people seem to favor "chaining" languages. I've see this in Smalltalk, with blah.send(m).add(3).rotate(x, y).etc()-ish constructs, and I've also seen people very excited about doing that lately in Javascript / jQuery. I don't really get the appeal, but I've gotten used to reading Lisp/tree expressions over the years. (Prolog syntax seems like a nice compromise, though - homoiconic data structures, but clause definitions tend to be flat. The structural difference is probably due to ubiquitous pattern-matching.)