5.1. Perl and Natural LanguagesThere's an especially good reason why Perl is used for handling natural language problemsPerl was created with natural languages in mind. In fact, Perl's creator, Larry Wall, has a joint degree in natural and artificial languages and sees Perl as influenced by both branches of his education. For instance, as Larry says, it is "officially OK" to program in a restricted subset of Perl, a sort of baby Perl. Much as no one is expected to learn the entirety of a human language before speaking it, Perl's ability to express programming concepts in multiple ways allows for a wide range of abilities to get the same job done. This is also why Perl folk aren't particularly worried about the ambiguities in the grammar of the languagenatural languages need ambiguity.[*] Perl can work out whether / is the division operator or the start of a regular expression based on context, the way humans do.
You can read more about the natural language concepts that influenced (and continue to influence) the design of Perl at Larry's site: http://www.wall.org/~larry/natural.html. |