arXiv:2007.02699v1 [cs.PL] 27 Jun 2020 plctoso hs r tl unn n r maintained. man are and and running institutions, still of are number these large of by first applications these used are of COBOL actively one and LISP, still from FORTRAN, history derived indeed, is and a rest languages, the is four that today said language is every it years, most few next fol- the Language) in lowed (ALGOrithmic (LISt ALGOL LISP language), Language), programming Processing Oriented modern Business first The (COmmon the TRANslation). COBOL 1955 (FORmula FORTRAN in born: thus s was and entire language lan- build it, to of assembly error-prone out and that tems laborious realized too far engineers was computer guage bu 1950s language, the programming by human-readable first the program. probably computer first the to led which work but Charles his – to of logic lead eventually no Engine would and Analytical that bages computation cascade no a was started it there punch-card-programmable – the sense modern of invention loom Jacquard the since languages. years, computer of th case however in and true process. taken holds evolution not still their are patterns in criteria two time evolutionary place the these taken over All have languages changes human such in Many convenience, expression. prevalence, their in disappeared. due gets strengths are concept ones respective news the of importan that arrival most is the gets that reasons, old many of adding, to one on due keep time words a ta over new eliminated develop, it concept human to evolutionary, in time the is However, long development where very person. language single persons, the is few languages, cases and of most designed in team are originator a languages by computer that implemented is languages puter optrlnugswt h vlto flf,weetelat the where life, by of dictated evolution been the has with languages computer in flnugs uuelnugs scripting-language languages, future new languages, of of tions time the in m languages which languages, programming experimental have of architectures. of multi-core world languages set At the a existing languages. suggests rule programming of it new end, features of the development the the how influenced addition, presen an is In on languages them removed. programming emphasizing gets into prominent most languages added of more older gets analysis o are of features of features languages strong features weak mixed new that the such the carry-over languages, previous, that the evidence than robust supportive give to Abstract ahn-pcfi sebylnug nte14swas 1940s the in language assembly Machine-specific 200 over for existed have languages programming The com- and human the between difference fundamental A ne terms Index nteEouino rgamn Languages Programming of Evolution the On Ti ae tepst oncsteeouinof evolution the connects to attempts paper —This rgamn agae’eouin classifica- evolution, languages’ Programming - twsntapormiglnug nthe in language programming a not was It . .I I. hoyo vlto fspecies of evolution of theory n d oeae 82construction 1842 Lovelaces Ada and , NTRODUCTION ohu nttt fEgneigadTcnlg,Jodhpur Technology, and Engineering of Institute Jodhpur et fCmue cec n Engineering and Science Computer of Dept. .R hwhr,Professor Chowdhary, R. K. mi:[email protected] Email: n tries and , s. Bab- Al- . The lder and ted, kes ys- an ay er d y e t t iha iesapo hi it er n ogl h same the roughly And year. birth alon their given of of times, languages stamp different time programming at as of born with list were is which will I languages significance, table older languag The of over. previous features carried the most of the however, majority extinct, large platform, multicore languages. these t of over life stable, years is 60 programming decade, new of per of span 11 lan rate to programming production approximating of the languages, statistics that the note we showing on. guages, II, so, extinct, table and programming extinct, the foxbase Shell From Dbase, AWK, made MYSQL made database Python, arr the languages, and scripting Perl (e. the died of programming in slowly new similarly old the ALGOL); the Java), Fortran, As C++, same. (e.g., less emerged languages or more remains ulation ttsta e ouaini eeae rmod hog th theory through old, The from generated also. is of languages operations population new programming that of states evolution the idw n a SXhv ag muto hi code their of both amount and large C, have in X C. entirely – in OS almost written language Mac written major assembly in and is first in Windows released the written Linux – was be today, C not C and into to then re-written System, and famously Operating invented, was Unix been 1969. had Code) tion n 0,rs l h agae hc aeit existence, into came which languages follows: as the features all their carried rest 60s, and u,sm ouain hudeitt tr ih ne few Once, with. start to exist (say languages should programming populations some But, • hseouinge n n ilbignwlnugsfor languages new bring will and on, goes evolution This pop- the of size the that says [2] evolution of theory The h hoyo vlto 2 ple olreetn on extent large to applies [2] evolution of theory The • y16,BSC(einrsalproeSmoi Instruc- Symbolic purpose all (Beginner’s BASIC 1964, By • I E II. h oto etrso ota u o the not but Fortran carried of C con- example, features for were control languages, features the new languages’ the in of sidered quality good only xsec,teodbcm xic;tu implementing thus extinct; the became old of the version better existence, a but - C, in that call subroutine the carried etrsgtaddfis ie hsipeetn the implementing thus time, new of first operation totally added old some got of and features features disappeared, some totally languages, languages created newly the in prto of operation Z oefaue from features some ndfeetpootos hsipeetn the implementing thus proportions; different in , aua selection natural rs-vr mutation cross-over, OUINOF VOLUTION recursion mutation cross-over n,we e agae aeinto came languages new when And, . X C ,Y Z Y, X, prto feouintheory. evolution of operation feouinter,and; theory, evolution of , oefrom some , MUE LANGUAGES OMPUTER feouintheory; evolution of and , eecetdi h 50s the in created were ) selection Y n oefrom some and , o h fittest). the (of goto ival it , g., be he es g e - TABLE I. HIGH-LEVEL LANGUAGES. TABLE III. CLASSIFICATION OF PROGRAMMINGLANGUAGES.
1951: Regional Assembly Lang. 1983: Ada S. No. Language class 1952: Autocode 1984: Common Lisp 1. Assembly languages (specific to Processor) 1954: IPL (forerunner to LISP) 1984: MATLAB 2. Authoring languages (HTML, Tutor) 1955: FLOW-MATIC 1985: Eiffel 3. Compiled languages (Fortran, C, Pascal) (forerunner to COBOL) 1986: Object-C 1957: FORTRAN (First compiler) 1986: Erlang 4. Command-line interface languages (OS command, shell) 1957: COMTRAN 1987: Perl 5. Data flow languages (VHDL, Labview) (forerunner to COBOL) 1988: Tcl 6. Data oriented Languages (SQL, Foxpro) 1958: LISP 1988: Mathematica 1958: ALGOL 58 1989: FL (Backus) 7. Embedded languages (Lua, other scripting languages.) 1959: FACT 1990: Haskell 8. Functional languages (Lisp, Haskell, Erlang) (forerunner to COBOL) 1991: Python 9. Interpreted languages (Java, Python, Ruby, Perl, PHP, 1959: COBOL 1991: Visual Basic 1959: RPG 1991: HTML PostScript, Python, Lisp, Logo) (Mark-up Language) 10. Logic based languages (Prolog) 1962: APL 1993: Ruby 11. Macro-languages (ML1, M4, MINIMAC, SAM76) 1993: Lua 12. Object Oriented languages (C++, Java) 1962: Simula 1994:CLOS (part of 1962: SNOBOL ANSI Common Lisp) 13. Procedural languages (COBOL, Fortran, C) 1995: Java 14. Rule-based languages (Prolog) 1963: CPL (forerunner to C) 1995: Delphi 15. Scripting languages (python, perl, awk, sed) 1964: BASIC (Object Pascal) 1964: PL/I 1995: JavaScript 16. Stack-based languages (Forth, RPL, PostScript, BibTeX) 1967: OyII (forerunner to C) 1995: PHP 17. Synchronous languages (Argos, Atom, Averest, LabVIEW, SIGNAL) 1968: Logo 1996: WebDNA 18. Syntax handling languages (Ada, Bash, BASIC, C) 1969: B (forerunner to C) 1997: Rebol 1970: Pascal 1999: D 19. Visual languages (VB .NET, Visual C++) 1970: Forth 2000: ActionScript 20. XML based languages (AIML, LGML, LOGML) 2001: C# 1972: C 2001: Visual Basic 1972: Smalltalk 2001: .NET 1972: Prolog 2002: F# 1973: ML 2003: Groovy B. Natural Programming Languages and Environments 1975: Scheme 2003: Scala 1978: SQL 2003: Factor One way to define programming is the process of trans- 1980: C++ (as C with classes, 2007: Clojure forming a mental plan in familiar terms into one compatible name changed in July 1983) 2009: Go 2011: Dart with the computer [1]. The closer the language is to the programmers original plan, the easier this refinement process will be. This is closely related to the concept of directness that, TABLE II. NUMBEROF NEW PROGRAMMINGLANGUAGESBORN, IN as part of direct manipulation, is a key principle in making user YEAR-BANDS interfaces (UI) easier to use. By “natural,” means “faithfully S.No. Year No. of languages representing nature or life,” which here implies it works in 1 1951-60 11 the way people expect. Natural programming is aimed for 2 1961-70 12 the language and environment to work the way that non- 3 1971-80 07 programmers expect. 4 1981-90 12 5 1991-00 15 Conventional programming languages require the program- 6 2001-10 09 mer to make tremendous transformations from the intended tasks to the code design. For example, a typical program to add a set of numbers in C uses three kinds of parentheses and three kinds of assignment operators in five lines of code, whereas amount is becoming obsolete. Thus, the population, remains a single “SUM” operator is sufficient in a spreadsheet. It is more or less stable. Hence, it can be hypothesized that, rule of argued that if the computer language were to enable people to survival of the fittest also holds true in the case programming express algorithms and data more like their natural expressions, languages too. the mental transformation effort would be reduced. Similarly, debugging activities could benefit from being more natural. Debugging is described as an exploratory activity A. Languages Classification aimed at investigating a program’s behavior, involving several distinct and interleaving activities: The high level languages (HLL) developed belonged to many different classes, due to their efficiency and features • Hypothesizing what run-time actions caused failure; better suiting to specific problem nature. For example, the com- • plexity and cryptic nature of machine languages contributed Observing data about a program’s run-time state; to creation of procedure oriented high level languages, like, • Restructuring data into different representations; Fortran and COBOL. C was better suited for system program- ming. When the programs became larger and unmanageable, • Exploring restructured run-time data; there was need to have languages to handle complexity of • Diagnosing what code caused faulty run-time actions; huge programs. This gave birth to object-oriented languages. and The present classification of programming languages is shown in table III. • Repairing erroneous code to prevent such actions. III.IMPLEMENTING PROGRAMMING LANGUAGES 4) Following the processing of the complete source program, the sequential object code stream is ana- Some of the terms for implementation of languages are: lyzed, and missing information is filled in from the appropriate tables. Processor- a computer program which processes other computer programs. The Compiler writers employ widely different implemen- tation techniques. However, there are certain building blocks which are common to many implementations. They may differ Compiler- A processor which converts a program written in in form, but the functions are generally the same. Among these a programming language (called the “source code”) into code basic functions are: which a computer can execute (called “object code”). • get next (source text) character Interpreter- a processor which accepts a program written in • a source code, converts it into some readily executable form, read next (source text) element (repeat getchar() and performs a controlled execution. The readily executable above) form may or may not be object code. • relate name to name-list • Translator- a processor which converts one source code obtain statement type into another. • process statement type • A. Structures generate intermediate object code • Like the natural languages have structures at word level, read intermediate object code sentence level, the meaning associated with sentences, the • generate or interpret final object code programming languages too have these structures. • popup/pushdown Lexical structures: This corresponds to world level struc- tures and decides about the token in the language. This is • skip to Specified (source or intermediate) character recognized by abstract machines, called finite automata [4]. • set character/operator flag Syntax structures: This sentence level structures, expressed by given by parse-tree, and recognized by the abstract machine IV. EMBEDDABILITY OF NEW LANGUAGES - push-down automata. Scripting languages are an important element in the current landscape of programming languages. A key feature of a Semantic structures: It is given by association of nodes in scripting language is its ability to integrate with a system parse-tree. language. This integration takes two main forms: extending and embedding [5]. In the first form, you extend the scripting Ambiguity in languages: If there is more than one syntax language with libraries and functions written in the system trees for the same sentence, the language as well as the language (e.g., in SQL) and write your main program in the grammar is ambiguous. scripting language (e.g., in HTML). In the second form, you embed the scripting language in a host program (written in Semantics: Semantics based on the lexicons. the system language) so that the host can run scripts and call functions defined in the scripts; the main program is the host program. In this setting, the system language is usually called B. Compiler Writing the host language. A major and difficult task for implementation of any new programming language is compiler writing. Basically, A. Embedding compilers are organized in the following manner [3]; At first sight, the embeddability of a scripting language 1) The source program to be processed is read into seems to be a feature of the implementation of its interpreter. memory as a stream of characters. Given any interpreter, we can attach an API (Application 2) The character stream is processed in character groups, Program Interface) to it to allow the host program and the where a group is a language keyword (IF, GO TO, script to interact. The typical host language for most scripting DO, etc.), a parameter name, a literal (numeric, al- languages is C, and APIs for these languages are therefore phanumeric, etc.) value, an operator, etc. This process mostly composed of functions plus some types and constants. is often called ”parsing” because of its similarity This imposes a natural but narrow restriction on the design to the parsing of sentences in a study of natural of an API for a scripting language: it must offer access to languages. language features through this narrow path. Syntactical con- 3) As the character groups are analyzed, the information structs are particularly difficult to get through. For example, in thus gathered is encoded into tables of information a scripting language where methods must be written lexically (such as a name list) and sequential streams of inside their classes, the host language cannot add methods to information (such as generated object code). a class unless the API offers suitable mechanisms. A key ingredient in the API for an embeddable language V. FUTURE OF PROGRAMMING LANGUAGES is an eval function, which executes a piece of code. In particular, when a scripting language is embedded, all scripts Is there a need for another programming language? There are run by the host calling eval. An eval function also are already abundant languages and no shortage of choices. allows a minimalist approach for designing an API. With an There are procedural languages, functional languages, object- adequate eval function, a host can do practically anything in the oriented languages, dynamic languages, compiled languages, script environment: it can assign to variables (eval‘‘a = interpreted languages, dynamic languages, and scripting lan- 25"), query variables (eval‘‘return a"), call functions guages, and it is not possible for any developer to even learn, (eval‘‘foo(35,’stat’)"), and so on. Data structures keep apart the development. such as arrays can be constructed and decomposed by evaluat- But still, new languages emerge with surprising frequency. ing proper code. For example, again assuming a hypothetical Some are designed by students or hobbyists as personal eval function, A C language code shown in below would copy projects. Others are the products of large IT vendors. Even a C array of integers into the script. small and mid-size companies are getting in on the action, creating languages to serve the needs of their industries. Why //Passing an array through API with eval. there is need to reinvent the existing features? void copy (int ar[], int n) { The answer is that, as powerful and versatile as the current int i; languages may be, no single syntax is ideally suited for every eval(ar = {}); // create empty array purpose. Over and above, programming itself is constantly for (i = 0; i < n; i++){ evolving. The rise of multi-core CPUs, cloud computing, char buff[100]; mobility, and distributed architectures have created new chal- sprintf(buff, ar[%d] = %d, i + 1, ar[i]); lenges for developers. Adding support for the latest features, paradigms, and patterns to existing languages, especially pop- eval(buff); /* assign i-th element */ } ular ones, can be prohibitively difficult. Sometimes the best } answer is to start from scratch. Following are some cutting-edge experimental program- B. Control ming languages, each of which approaches the art of software The first problem related to control that every scripting development from a fresh perspective, tackling a specific language must decide is “where to keep the main function?”. problem or a unique shortcoming of today’s more popular When we use the scripting language embedded in a host, we languages. want the language to be a library, with the main function in the host. However, for many applications, we want the language A. Go as a standalone program with its own main function. Go is a general-purpose programming language suitable for The scripting language Lua solves this problem with the everything from application development to systems program- use of a separate standalone program. Lua itself is entirely ming. It more like C or C++ than Java or C#. But like the implemented as a library, with the goal of being embedded in latter languages, Go includes modern features such as garbage other applications. The lua command-line program is a small collection, runtime reflection, support for concurrency, and is application that uses the Lua library as any other host to run meant to be easy to program. pieces of Lua code. The code given below is a bare-bones version of this application. B. F#
// A Lua application. Functional programming has long been popular with com- #include lualib.h puter scientists and academia, but pure functional languages #include