📜 ⬆️ ⬇️

History of programming languages: Perl is an unusual language created by a linguist for programmers.



The Perl programming language was created by Larry Wall (Larry Wall) in 1987, when he worked as a system programmer at the American company Unisys. The goals that Larry pursued when developing a new programming language are reflected in its name - PERL, which later became deciphered as the Practical Extraction and Report Language, that is, “a practical language for extracting“ data ”and“ creating “reports."

One of the legends about the origin of Perl says that a language with that name already existed at that time, so Larry shortened the name to one letter without changing the pronunciation. Ironically, today nobody remembers that language except historians, and Perl is known to the whole world.
')
Although, according to another version, Larry called the language he created by the name of his bride.


Larry Wall

The development of Perl was influenced by the languages ​​Ada, Basic, Fortran, Lisp, Pascal and, of course, C. Perl absorbed various trends in computer science: procedural, modular, functional and object-oriented programming, macro-processing of the text, and besides this - OS culture Unix, with its rich set of commands and utilities, a well-thought-out architecture and a unified approach to data presentation.

Unix Legacy


The decisive influence on the development of the Perl language was the Unix environment in which it was developed. From the very beginning, this operating system was created by a small group of programmers for themselves. Therefore, the principles laid down in it are focused on the convenience of everyday use by man: everything was done as functionally, briefly and consistently as possible. For example, most system settings are stored in plain text, so that a person armed with a simple text editor can read and correct them.

For those familiar with the Unix operating system, this material will not be new. But many programmers working with MS-DOS and Windows, it is important to get acquainted with the principles of programming based on the tools (software tools), which originated and developed together with Unix OS. Famous programmers Brian W. Kernighan and Philip Plauger wrote a great book about them. Here are the main points of this approach.

• To solve a problem, programs of small size are developed, each of which performs one function of the problem to be solved.

• The problem is solved by the interaction of small programs by sequential processing of data from each of them.

• When developing these small programs, you should be guided by their maximum independent use so that they can be used for other tasks. Thus, tools (IS) are gradually being created for further universal use.

• Most tools are developed as programs that are filters that read the data stream from standard input and write the processed data to standard output.

• Combining tools into applications is done using the OS command language: redirecting I / O, creating software pipelines (directing the output stream of one program to the input of another).

• The main format of stored data for tools is text files that are equally well suited for software processing and reading by humans.

• For efficient processing of poorly structured textual information, regular expressions are used.

Favorable factors


The language quickly spread among Usenet users. Despite the fact that in the Unix operating system (Perl), for which Perl was created, there were already numerous and varied means for processing textual information (awk, csh, grep, sed, and others), a huge number of system administrators and programmers fell in love . It was easy to learn and use: the syntax was similar to C, there was no need to pre-compile the Perl program, the source code was easy to modify. And most importantly, it was a really very practical language: most everyday tasks were easily solved with its help, from the simplest to the most complex.



Actively using Perl, programmers from different countries sent Larry Wall suggestions to add new features or improve existing ones. Gradually, Perl has evolved from a Unix word processing tool into a powerful universal programming system. In the mid-1990s, as the Internet developed, Perl became a favorite tool for webmasters to create dynamic websites and Internet programming.

Thanks to its powerful built-in text data tools, Perl is widely used to process information in HTML and XML formats.

Perl has become an indispensable component of any delivery of the OS of the Unix family (for example, FreeBSD, Linux or Solaris). In addition, Perl is currently implemented for almost all modern hardware platforms (supercomputers, RISC, Macintosh, PC, handheld computers) and operating systems (AIX, Linux, MacOS, MS-DOS, NetWare, OS / 2, QNX, Solaris, Windows, VMS and so on).

This makes it possible to easily transfer popular Perl programs from one operating environment to another.

Undoubtedly, its widespread use was facilitated by the fact that it is distributed free of charge under one of the licenses: either the GNU General Public License (GPL) or the Artistic License is optional. But the main thing is that it has all the means to perfectly help out professionals and inexperienced programmers when they need to quickly solve various system and application tasks, from the simplest to the most complex. As a result, Perl has become one of the most successful open source projects (open source) along with Apache, Linux, PHP, and Python.

Unusual programming language


Perl's design principles are very different from those used in programming before. The innovative character of the language was associated with the unique features of the author’s personality, Larry Walla, and his diverse interests.

While studying at the university, Larry Wall received a linguistic education. In addition, he was engaged in programming and worked at the university computer center.

Perhaps the main merit of Larry as the author of Perl is that he managed to create a language that takes into account the properties and principles of natural language: situational polysemy of constructions, reasonable redundancy (and thus stylistic diversity), maximum adaptability to different levels of knowledge of native speakers, flexibility and expressive syntactic means. All this gives a special creative taste to the very process of “writing” in this language.

People who write about Perl unwittingly use the terms idiom, metaphor, synonym, context, etc., commonly used in natural languages. Larry Wall himself, in describing the Perl language, makes extensive use of linguistic terms: noun, verb, sentence, singular and plural, pronoun.

Outstanding linguist B.L. Whorf remarked: "Language shapes our way of thinking and determines what we can think about." The same idea is confirmed by J. Bentley in the book “Pearls of Programmers' Creativity”, describing the case when it was the features of the APL programming language that pushed the developer to the original solution of the problem with arrays. In this sense, Perl, as a language for translating the ideas of a programmer, does not constrain the imagination of the developer, gives him maximum freedom of expression, and sometimes even suggests non-standard solutions.

As disadvantages of the language mention :
  • lack of a static typing mechanism;
  • redundancy of language means;
  • lack of modularity;
  • "Perverted" implementation of the PLO.

Perl linguistic principles


Human languages ​​are subject to the use of a limited set of constructions for expressing different meanings and reapplying them in various contexts. In accordance with this principle, in Perl the same language constructs have different meanings, and their unambiguous understanding is determined by the context of use.

The principle of context is closely related to the previous one. Context is used in natural languages ​​to correctly interpret the meaning of an expression. Obeying this principle, in Perl, for example, many functions return a single value or list depending on the context of the call: does the syntax require the expression of a single or multiple value.

The principle of semantic underlining in natural languages ​​serves to draw attention to an important part of the utterance. In this case, the allocated part is usually placed at the beginning of the sentence. In Perl, a programmer can use this principle to emphasize meaning by choosing a simple sentence with a modifier or a conditional construct, for example:
$ we-> shall (do ($ it)) if $ you-> want ($ it); # or
if $ you-> want ($ it) {$ we-> shall (do ($ it))}

The principle of freedom in natural languages ​​suggests that there are always several options for expressing the same thought. As in natural languages, in Perl the same result can be achieved in several ways, using different expressive means of the language. This is the so-called TIMTOWTDI principle - the abbreviation is read "Tim Toody" and stands for "There is more than one way to do it": "there is more than one way to do something." In accordance with it, each developer chooses the version of the language structure that is more suitable for him in a particular situation, more consistent with his style or level of knowledge of the language.

Such an approach is completely opposite to the strictly formal view of programming languages, when unambiguity and minimization of language constructs become the main goals of development. But from the point of view of psychology and linguistic thinking, the “linguistic approach” is in many ways more productive, paradoxically! After all, it stimulates creativity, attracting the human experience of using natural language, and it becomes fascinating and interesting to write programs in Perl. That's probably why Perl programmers love the word “fun” so much (fun, funny).

The first version and the "Camel Book"


Larry Wall began developing Perl in 1987, when he worked as a programmer at Unisys. Version 1.0 was released and announced on December 18, 1987 as "" replacement "for awk and sed".

Perl 2 was released in 1988. The main innovation in it was a reworked regular expression mechanism.

Perl 3, released in 1989, was able to handle binary data streams.

Initially, the only documentation for Perl was the only (of enormous length) man page. In 1991, the book Programming Perl was released (known to many programmers as Camel Book because of the cover image), which, de facto, became the standard language.



At the same time, the version of the language was “raised” to the 4th, not so much to indicate significant changes as to indicate that this version of the language is documented by the book. Perl 4 went through a series of releases, focusing on Perl 4.036 in 1993.

Perl 5


Development of Perl 5 began in 1994. At the same time, the perl5-porters mailing list was created to coordinate work on porting Perl 5 to various platforms. It still remains the primary Perl 5 development, maintenance and porting forum.

Perl 5.000 was released on October 17, 1994. It included a completely rewritten interpreter, as well as many new language features, such as objects, links, local variables (my $ var_name), and modules. The modules were especially important, as they provided a mechanism for extending the language without modifying the interpreter. This allowed us to stabilize the interpreter, but at the same time, it gave the opportunity for ordinary Perl programmers to add new features to the language. Perl 5 is in active development to this day.

Perl 5.001 was released on March 13, 1995. Perl 5.002 was released on February 29, 1996 with new prototype support. This allowed module authors to create functions that behaved in the same way as Perl’s built-in functions. The Perl version 5.003 appeared on June 25, 1996, and fixed the security issues that were discovered.

One of the most important events in the history of Perl 5 happened outside of the actual language and was the result of support for modules. On October 26, 1995, the CPAN (Comprehensive Perl Archive Network) began its work, which became the repository of Perl modules, as well as the source code of the language itself. At the moment, the network has more than 25,000 modules created by more than 8,000 programmers.

Perl 5.004 was released on May 15, 1997 and contained, among other things, the UNIVERSAL package, which gave the language the main object from which all classes automatically originated. The ability to request a version of the modules was also included. In addition, Perl began to support Microsoft Windows, as well as a number of other operating systems.

Perl 5.005 was released on June 22, 1998. This release included several improvements to the regular expression processor, new interceptions to the backend using B :: * modules, qr // quotes operator for regular expressions, a large selection of other new modules, as well as support for a number of operating systems, in particular, BeOS.

2000s


Perl 5.6 was released on March 22, 2000. The main changes included support for 64-bit systems, the presentation of strings in the Unicode standard, support for large files (files larger than 2 GB) and the keyword our. During the development of Perl 5.6, it was decided to change the version naming scheme to be closer to other open source projects. Version 5.5.640 followed version 5.005_63; According to the plan, versions in the design should have been assigned odd numbers, stable versions - even.

In 2000, Larry Wall called on the community to actively discuss proposals for the next version of Perl. The result of this discussion was 361 RFCs (Request for Comments), which were used in the development of Perl 6.

In 2001, work began on a final document, summarizing proposals for creating a new generation of Perl. The result was presented not as a formal document, but as a summary of all RFCs. By this time, Perl 6 existed solely as a language description.

Perl 5.8 was first released on July 18, 2002, and has since received an annual update. The latest version of Perl 5.8, number 5.8.9, was released December 14, 2008. Perl 5.8 improved support for Unicode, added new I / O implementations, added support for multithreading, increased numerical accuracy, and added several new modules.

In 2004, work began on Synopsis (Synopsis) - originally conceived as a series of documents summarizing the final document mentioned above. However, this series of documents gradually became the Perl 6 specification. In February 2005, Otrius Tan began work on Pugs, a Perl 6 interpreter written in Haskell. This was the first real attempt to make Perl 6 a reality. This attempt stalled in 2006.

When are you over 20


December 18, 2007, the day of the 20th anniversary of Perl 1.0, was released version Perl 5.10.0. This version contained a number of notable innovations that brought it closer to Perl 6. One of these innovations was the new switch statements (called “given” / “when”), the update of regular expressions, as well as the “smart” match operator “~~”.


Pearl Anniversary

At about the same time, the development of a new Perl 6 implementation, known as Rakudo Perl, developed in conjunction with the Parrot virtual machine, began in earnest. Since November 2009, Rakudo Perl is regularly updated every month and is currently the most complete implementation of Perl 6.

A significant change in the Perl 5 development process occurred after the appearance of Perl 5.11. The developer community has moved to the monthly cycle of issues, with planning the release date for three months ahead.

On April 12, 2010, Perl 5.12.0 was introduced to the public. Outstanding innovations include support for the package NAME VERSION syntax, Yada Yada operator (used for marking the placeholder code, which has not yet been implemented), a complete solution to the “2038 problem” (Y2038), regular expression operator overload, DTrace support (dynamic tracing), as well as full support for the Unicode standard 5.2.

September 7, 2010, Perl 5.12.2 was released, and January 21, 2011 - Perl 5.12.3. These issues include updated modules, as well as some documentation changes. Version 5.12.4 was released on June 20, 2011. The latest version of this branch, 5.12.5, was released on November 10, 2012.

Extreme Five Year Plan


May 14, 2011 released Perl 5.14. JSON support has become embedded since version 5.14.2. The latest version of this branch, 5.14.4, was released on March 10, 2013.

May 20, 2012 released Perl 5.16. A significant innovation is the ability to specify the desired version of Perl, which needs to be emulated, allowing users to update Perl, but keep the old scripts working, which would otherwise be incompatible with the new version. The Perl 5.16 kernel supports Unicode 6.1.

May 18, 2013 released Perl 5.18. Significant innovations include new hints of dtrace, lexical functions, an increase in the number of functions included in the core, a revision of the implementation of hashes for security reasons, support for Unicode 6.2.

On May 27, 2014, a new stable version was released - Perl 5.20.0. The development took about 12 months, starting with Perl 5.18.0, and contains approximately 470,000 modified lines among 2,900 files from 124 authors.

In December 2015, Perl 5.22.1 was released. Development was conducted 6 months.

On May 9, 2016, a new stable version of the Perl programming language 5.24.0 was released. The development took about 11 months, starting with Perl 5.22.0, and contains approximately 360,000 modified lines among 1,800 files from 77 authors.

According to July 2016, the TIOBE index, which measures the growth in popularity of programming languages, showed that Perl ranks 9th:


This is 2 positions higher than last year.

Perl 6


As noted in Wikipedia, Perl 6 is another version of the Perl programming language (from a structural point of view, it is more convenient to treat Perl 6 as an independent programming language). It is a revolutionary development of the language, the latter written almost "from scratch". For the first time in the history of Perl, the development of a new version began with the writing of specifications that are undergoing changes to this day.

Perl 6, compiling a program, creates a bytecode that the virtual machine further executes. The same approach is used in Java and .NET Framework technologies.

In fact, we can speak of a new language that has common roots with the previous version of Perl, but is not compatible with it, although the specifications assumed a compatibility mode.

Development of Perl 6 began in 2000 and continues to this day.

Initially, Perl was conceived as a tool, comparable in speed to compiled Unix utilities. The speed of the work was to be ensured by the fact that the Perl executing system reads the source code of the Perl program and compiles it on the fly, then immediately interprets the compiled program.

Larry Wall jokingly proclaimed the three main virtues of a programmer: laziness, impatience and self-conceit. In his opinion, Perl is designed to match these developer qualities.

Source: https://habr.com/ru/post/305402/


All Articles