Приглашаем посетить
Биографии (biografii.niv.ru)

Section 5.1.  Perl and Natural Languages

Previous
Table of Contents
Next

5.1. Perl and Natural Languages

There'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.

[*] The aforementioned Sean Burke has a linguistic conjecture that says all natural languages tend toward some element of grammatical ambiguity; ambiguous languages are easier to learn. This may explain the relative difficulty of learning highly regularized artificial languages, such as Lojban.

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.

    Previous
    Table of Contents
    Next