<<

arXiv:2007.02699v1 [cs.PL] 27 Jun 2020 plctoso hs 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 , derived indeed, is and a rest languages, the is four that today said language is every it years, 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 guage bu 1950s language, the programming by human-readable first the program. probably computer first the to led 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 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 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 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 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, 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 From Dbase, AWK, made MYSQL made Python, arr the languages, and scripting (e. the died of programming in slowly new similarly old the ALGOL); the ), Fortran, As ++, same. (e.g., 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 – was be today, C not C and into to then re-written System, and famously Operating invented, was 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 ih ne few Once, with. 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 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 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 ival it , g., be he es g e - TABLE I. HIGH- LANGUAGES. TABLE III. CLASSIFICATION OF PROGRAMMINGLANGUAGES.

1951: Regional Assembly Lang. 1983: Ada S. No. Language class 1952: 1984: 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 ) 1986: Erlang 4. Command-line interface languages (OS command, shell) 1957: COMTRAN 1987: Perl 5. Data flow languages (VHDL, Labview) (forerunner to COBOL) 1988: 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: 1959: RPG 1991: HTML PostScript, Python, Lisp, Logo) (Mark-up Language) 10. Logic based languages () 1962: APL 1993: Ruby 11. -languages (ML1, , MINIMAC, SAM76) 1993: Lua 12. Object Oriented languages (C++, Java) 1962: 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: 15. Scripting languages (python, perl, , ) 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, , Averest, LabVIEW, SIGNAL) 1968: Logo 1996: WebDNA 18. Syntax handling languages (Ada, , BASIC, C) 1969: (forerunner to C) 1997: 1970: Pascal 1999: D 19. Visual languages (VB ., Visual C++) 1970: Forth 2000: ActionScript 20. XML based languages (AIML, LGML, LOGML) 2001: C# 1972: C 2001: Visual Basic 1972: 2001: .NET 1972: Prolog 2002: F# 1973: ML 2003: Groovy B. Natural Programming Languages and Environments 1975: Scheme 2003: Scala 1978: SQL 2003: 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 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 . 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 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 “” operator is sufficient in a . 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, 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 is ana- Some of the terms for implementation of languages are: lyzed, and missing information is filled in from the appropriate tables. Processor- a 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 , but the functions are generally the same. Among these a (called the “”) into code functions are: which a computer can execute (called “object code”). • get next (source text) - 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 . 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 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-, 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 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 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 program (written in : 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 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, to interact. The typical host language for most scripting DO, etc.), a parameter name, a literal (numeric, al- languages is C, and 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 . FUTURE OF PROGRAMMING LANGUAGES is an 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 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 [], 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 , 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. has long been popular with com- #include lualib.h puter scientists and academia, but pure functional languages #include like Lisp and Haskell are often considered unworkable for real- #include lauxlib.h world . One common complaint is that int main (void) { functional-style code can be difficult to integrate with code and char text[80]; libraries written in imperative languages like C++ and Java. lua_State *X = luaL_newstate(); /* create F# is a Microsoft language designed to be both functional a new state */ and practical, it is first-class language on the .Net Common luaL_openlibs(X); /* open libraries */ Language Runtime (CLR), it can access all of the same /* reads text lines and execute */ libraries and features as other CLR languages, such as C# and while (fgets(text, sizeof(text), stdin) Visual Basic. F# also offers constructs to aid asynchronous I/O, != NULL) { CPU parallelization, and off-loading processing to the GPU. //compile text to a function F# compiler and core library are available under the Apache luaL_loadstring(X, text); open source license; you can start working with it for free and lua_pcall(X, 0, 0, 0); even use it on Mac and Linux systems. /* call the function */ } C. Dart lua_close(X); return 0; It is an Experimental programming language for web } programming, created by google, and its performance improves to better and better as size becomes larger and larger, which X10 code most resembles Java; in fact, the X10 runtime is not true for JavaScript. Like JavaScript, Dart uses C-like is available as a native executable and as class files for the syntax and keywords. One significant difference, however, is JVM. The X10 compiler can output C++ or Java source code. that while JavaScript is a prototype-based language, objects in The compiler and runtime are available for various platforms, Dart are defined using classes and interfaces, as in C++ or Java. including Linux, Mac OS X, and Windows. Dart also allows programmers to optionally declare variables with static types. The idea is that Dart should be as familiar, G. Chapel dynamic, and fluid as JavaScript, yet allow developers to write code that is faster, easier to maintain, and less susceptible to Chapel is Cray’s first original programming language, was subtle bugs. It’s designed to run on either the client or the designed with supercomputing and clustering in mind. Among server both. its goals are abstracting parallel algorithms from the underlying hardware, improving their performance on architectures, and D. Opa making parallel programs more portable. Web development is a complicated task, requiring code in Chapel’s syntax draws from numerous sources. In addition multiple languages: HTML and JavaScript on the client, Java to the usual suspects (C, C++, Java), it borrows concepts from or PHP on the server, SQL in the database, and so on. scientific programming languages such as Fortran and Matlab. Opa does not any of these languages individually. its more compelling features is its support for “multi-resolution Rather, it seeks to eliminate them all at once, by proposing programming,” which allows developers to prototype appli- an entirely new paradigm for Web programming. In an Opa cations with highly abstract code and fill in details as the application, the client-side UI, server-side logic, and database implementation becomes more fully defined. I/O are all implemented in a single language, Opa. At present, it can run on Cray supercomputers and various Opa accomplishes this through a combination of client- and high-performance clusters, but it is portable to most Unix-style server-side frameworks. The Opa compiler decides whether a systems, Windows with . given routine should run on the client, server, or both, and it outputs code accordingly. H. Fantom Opa’s runtime environment bundles its own and database management system, which cannot be replaced Should you develop your applications for Java or .Net? If with stand-alone alternatives. That may be a small price to pay, you code in Fantom, you can take your pick and even switch however, for the ability to prototype sophisticated, data-driven platforms midstream. This is because Fantom is designed Web applications in just a few dozen lines of code. Opa is from the ground up for cross-platform portability. The Fantom open source and available now for 64- Linux and Mac OS project includes not just a compiler that can output X platforms. for either the JVM or the .Net CLI, but also a set of APIs that abstract away the Java and .Net APIs, creating an additional E. Zimbu portability layer. It aims to be a fast, concise, portable, and easy-to-read While it remains inherently C-like, it is also meant to language that can be used to code anything from a GUI improve on the languages that inspired it. It tries to strike application to an OS kernel. It uses C-like expressions and a middle ground in some of the more contentious syntax operators, but its own keywords, data types, and struc- debates, such as strong versus dynamic typing, or interfaces tures. It supports , threads, and pipes. versus classes. It adds easy syntax for declaring data structures and serializing objects. And it includes support for functional Portability is a key concern. Although Zimbu is a compiled programming and concurrency built into the language. language, the Zimbu compiler outputs ANSI C code, allowing binaries to be built only on platforms with a native C compiler. . CONCLUSION F. X10 This paper has presented a broad history as well as the Parallel processing was once a specialized niche of soft- evolution of programming languages, and relates the evolution ware development, but with the rise of multi-core CPUs of languages with the evolution of species, given and demon- and , parallelism is going mainstream. strated in the Darwin’s Theory of evolution. In addition, it has Unfortunately, today’s programming languages are not keeping presented the embedding features of scripting languages, and pace with the hardware. To counter it, IBM Research is survey of a few experimental languages, which may rule future developing X10, a language designed specifically for modern programming in the multi-core era. parallel architectures, with the goal of increasing developer In pursuit of the searching goal of an ideal programming productivity “times 10.” language, if studies are carried out to examine the language X10 handles concurrency using the partitioned global and structure that children and adults naturally use in solving address space (PGAS) programming model. Code and data problems before they have been exposed to programming, it are separated into units and distributed across one or more can be most natural to conclude a most appropriate language. “places,” making it easy to scale a program from a single- For this, participants can be presented with programming tasks threaded prototype (a single place) to multiple threads running and asked to solve them on paper using whatever text or on one or more multi-core processors. diagrams they want. REFERENCES [1] Brad A. Myers, et al., Natural Programming Languages and Environ- ments, Communications of the ACM, Sept. 2004/. 47, No. 9, pp. 47-52. [2] Charles Darwin, On the Origin of Species, publisher: John Murray, Nov. 24, 1859, pages 502 [3] Glass R.L., An Elementary Discussion of Compiler/Interpreter Writing, Computing Surveys, Vol. 1, No. 1, March 1969, pp. 55-78. [4] K. R. Chowdhary, Fundamentals of Discrete Mathematical Structures, PHI Learning, Second ., 2012, ISBN: 978-81-203-4506-5, pages: 312. [5] Roberto Ierusalims et. al, Passing a Language Through the Eye of a Needle, In Communications of the ACM, July 2011, Vol . 54, no. 7, pp. 38-43.