This important event in the programming world occurred in 1986, when a seemingly ordinary guy Larry Wall after a painstaking job told the world that he had developed the Perl programming language. The path to this significant event was difficult and thorny, but the result was worth it. How, who and why developed a new programming language? Here there are answers to all these questions.
The impetus for this discovery was a good reason. Then he took part in the UNIX project. The work was complicated, as it was necessary to create a secure network with many levels, so that it was possible to combine the work of several computers working from each other over considerable distances. The entire process was successful, but the reports had to be made very time-consuming, not only with a huge number of files, but also with cross-references between them.
Wall decided to use the awk filter to work, but there was an unexpected obstacle: it was impossible to control either the opening or closing of a huge number of files-ironically-based on the information about the location of these files.
At first, Larry decided to write a specific system utility to solve an unforeseen problem. It seemed to be a way out of this situation. But before that they had already compiled several utilities to solve this problem, which, unfortunately, did not become an outlet for UNIX standards.
That's why a talented system administrator, a linguist by education who helped him in his work, ventured and created the Perl programming language, so that he could simultaneously process text files, find a solution for system tasks, and create more understandable reports. And at the same time that it was low-level programming that would be accessible in C. Because the Perl interpreter was written on it.
New programming language: the reason for the occurrence
According to Larry, he helped him create a new language laziness. But it was the laziness that allowed to solve an important task: how to avoid compiling a large number of programs in different languages, which were an integral part of the UNIX tools. Too tiring was such a procedure.
The advantage of the new language was appreciated by others, since it harmoniously combined the possibilities of file processing and system administration. And this is exactly the two necessary facts that are needed during the programming of the UNIX system.
It should be noted that the Perl programming language has a slight difference from other similar languages: it appeared because it was necessary, and not to hit users or come up with another beautiful tool that does not play a special role.
On the contrary, when Larry acquainted users with his invention, it made a real furor among system administrators, because now there was no need to spend a lot of time to understand several programming languages, and it became possible to easily solve problems by using a single language using a symbol table.
Translated into Russian, the abbreviation Perl sounds like "a practical language to extract data and compile reports."
The symbol of this kind of language decided to make a camel, probably considering that, since the animal is a noble, hardy, capable of many days without a murmur to bear a heavy burden, the same work resembles the load on a new language, too serious.
Why a new language was immediately appreciated by many users, there are many reasons. Whoever uses the UNIX system knows that the settings here go through special files - ordinary text files, and changes are made after the commands are executed. They are written in a special shell language, and their execution occurs from the command line.
The UNIX system allows you to create individual commands, based on the commands of the interpreter and saving them. They remain in text files, and if required, are executed as a standard set of operating system commands - only through the command line.
User Commands Otherwise scripts are called. In the UNIX system, the operating system administrator has to write a large number of scripts, which in turn process the subsequent scripts, i.e., text files using special programs:
- Awk. The program allows you to compare with these samples and serves as a report generator.
- Sed. Acts as a batch editor for text files.
Programs as a filter alternately read the lines of input files. Then they perform the actions applicable to the line, which are determined by the program commands. In this case, a chain of symbols is selected for certain patterns, replacement according to established rules, new files are generated.
The new programming language Perl has opened up very rich features in those cases where you want to process text, persistent expressions. Perl has a great variety of auxiliary modules.
Over time, this unique language has expanded its boundaries, and is now widely used in web development and games, if it is necessary to network programming or graphical interface development for users.
The language took root and fell in love with ease of use, now it is recognized as the most dynamic programming language. He supports a variety of paradigms, which includes styles - functional, procedural and others, he has control over the memory, there is support for text processing.
No wonder one of L. Wall's mottos says that simple things can remain simple, but complex ones must be fulfilled.
It is not difficult to learn the language, figuring out the assignment expressions, code blocks, control structures and functions.
Similarity with other languages
Larry borrowed a lot from other programming languages. For example:
- Command shell UNIX. Variables are marked with leading signs, they clearly express the type of the variable and help these variables appear in the interpolated lines. The built-in functions provide the toolkit, and it is used to program the shell.
- Arrays of Lisp.
- Using Perl regular expressions from awk , at the same time borrowing from it associative motives.
- From sed.
But with its own tasks the new language coped much faster, and it, therefore, began to apply not only to solve the problems of system administration.
Wall got a package from G. Spencer that helped him to master Perl regular expressions, modifying it for his brainchild. Many of the developed functions are not only due to Larry. Colleagues and friends were equally keen to bring their innovations to the unique program being developed. And when the language appeared on the Internet, a whole community of like-minded people formed, which also helped to improve it. In this work, more than 10,000 programmers have been involved since statistics claims.
However, the language is also being improved by developing packages that are used with success in implementing new language applications for developing information-related technologies.
Stages of development
Small, but significant stages of the path can be identified in the table.
Time of creation
Perl 1. I did not have many possibilities. This was the easiest way to search the files by templates. But there were file descriptors, format and scalar variables.
1988 year. January.
Perl 2. There is not yet an improved mechanism for regular expressions.
1988 year. June.
Perl 3. Developers have made it possible to process streams of binary data.
1989 year. October.
Perl 4. Appeared for the most part thanks to the book that saw the light, "Programming Perl ", but under the name more known as" Camel Book ". The new language is documented. This period passed a whole series of releases, as a result, stopping at version 4.036. It was already 1993. Then work began on the next - V - version.
Perl 5. Support for complex data types has appeared, an object model that includes links, packages, and a closure as a value. A mailing list is created so that you can coordinate the work on different platforms. In fact, this was the main forum for the development, porting and maintenance. Modules are now with an important part of the version, because they were able to expand the language, but without the participation of modifying the interpreter. This could stabilize it, but it expanded the language possibilities.
1994 year. October.
Unique Perl - programming language: the pros and cons
Perl 5 is actively developed and now, replenishing all the new versions. But all the developments are related by several factors: automatic typing of data is performed, automatic control over the memory is performed.
Thanks to the interpreter, not only types are known, but also memory requests for each program object, and it is easy for him to allocate memory, to free up when calculating references.
It should be noted that Perl programming distinguishes the interpreter from others. Proof of this is the translation of the program into an intermediate bytecode, and only then it starts executing. In comparison: the traditional works a little differently - the input operator is interpreted and instantly executed, which is fraught with syntactic errors during the workflow. Perl allows you to detect this kind of errors already during the translation into the by-code.
In order to transfer one type of data to another, an automatic process is required, if it is impossible to translate any kinds of data, this can lead to a fatal error.
The merit of version 5 004 is that there is a package UNIVERSAL, which gave the main object to the main object, and all classes originated from it - on an automatic basis. Now you can request the version of the modules. It became a reality to support the request for a version of the modules. In addition to this, perl began to support many operating systems, and Microsoft Windows as well.
Version 5.005, released in 1998, significantly improved the quality of the processor of regular expressions, improved new intercepts to the backend, which was solved with the help of certain modules and expanded support for operating systems.
Two thousandth year gave the world a new, 5.6, version of the language of pearls. It already looked much more solid than the first, had 64-bit systems, was able to support files more than two GB, included the presentation of strings, given the standard Unicode, as well as the keywords - our. During this period, the scheme of version names is changing, so that it is closer to other projects - open source.
An interesting fact is that if a version is in development, it will be assigned a number with odd numbers, and a stable number will be evenly numbered.
Wall then turned to his adherents with a request to make suggestions for creating a more advanced version. His call was heard, and the result was 361 documents, which helped to develop the VI version. On the court, users were presented with a document that most likely resembled a summary, and this version existed, but only in the form of a description of the language. A number of documents turned into a specification of this version. The attempt to launch the interpreter of the VI version in 2006 was stopped. But since 2009 under the name Rakudo Perl this version lives and periodically updates it.
A significant change in the development process of Perl 5 occurred after the appearance of Perl 5.11. The developer community switched to the monthly release cycle, with the release date planning for three months ahead.
A new version
Version 5.8 appeared in 2002. It is famous for that, since that time it was updated yearly until 2008, it significantly improved the support for Unicode, added many functions, which include support for multithreading, original implementation of input-output and increased the accuracy of numeric. And, again, new modules have appeared.
By the 20th anniversary of the creation of the general-purpose programming language, the new version under the number "5.10.0" did not disappoint the users once again. There were new operators, as well as "smart" - coincidences, regular expressions were updated.
What did the last years bring?
Every year, all the new improvements helped to make the language invented by Wall, all the easier it is easier and more accessible. The year 2010 was marked by the fact that perl syntax was supported by package NAME VERSION, overloading of regular expression operators, in subsequent years modules were updated, support for operators expanded.
The goal was to specify at runtime the version that should be emulated, therefore, to allow perl to be updated, but not to lose the working abilities of the scripts used, which pose a threat to be incompatible with the presented new version. There are more functions, increased security.
At the end of May, more recently, the next version appeared, as always, more refined and convenient for work. Today anyone can test it and on their personal experience make sure that a lot of work has been done to create this programming language.
In this Perl language, arrays are not limited. It is possible to solve, using the language, non-traditional tasks, for which it would otherwise be involved in several cases, perform administrative tasks, process qualitatively text files, and not much time will be spent on all the problems of time. Developing new programs using the symbol table, using the necessary operators, the result will be correct and fast.
This article once again proved that for the enthusiasts of their business there is nothing impossible. Sometimes even the most insignificant problems lead to useful discoveries that can make our life a little easier.