proj-plbook-plChHistLangs

Difference between revision 30 and current revision

No diff available.

Table of Contents for Programming Languages: a survey

Of historical interest

I place a language in the 'of historical interest' section if it seems to me that the language introduced important ideas or was the basis for an important language, but the language is no longer very popular (for writing new programs; there are plenty of old languages with lots of legacy code), and if it seems to me that either the language has been 'succeeded' by another, or that most of the interesting innovations in the language have been incorporated into many others.

If language still seems to me to be the best way to learn about some idea, then i did not confine it to the 'of historical interest' section, even if it is unpopular.

See also https://en.wikipedia.org/wiki/History_of_programming_languages

1990s-2000s-era CTM languages

BitC

A CTM language.

Retrospectives:

Links:

Cyclone

A CTM language designed to support program control over low-level memory representations, including pointers, while using static typing to prohibit common pointer errors.

Influenced Rust.

Links:

Other 1990s-2000s era CTM languages

Links:


1960s-1980s era structured programming languages

BCPL

goals: "removing those features of (the CPL) language which make compilation difficult"

influences: CPL

people: Martin Richards

notes: predecessor of B, which led to C

See proj-plbook-plChSingleIntermedLangs.

BCPL Links

B

goals: "B was essentially the BCPL system stripped of any component that Thompson felt he could do without" ( http://en.wikipedia.org/wiki/B_%28programming_language%29 )

people: Ken Thompson, Dennis Ritchie

influences: BCPL

attributes: typeless (everything is a word)

notes: predecessor of C

Links:

Pascal and Oberon

Because of its historical popularity, its importance as an exemplar of a style of computer language, its readability, Pascal gets its own chapter. Because it is a successor to Pascal, and because of its minimalism, that chapter is also about Oberon.

See chapter on Pascal and Oberon.

Modula-2

Goals: "To create a language adequate for describing entire systems, from storage allocator to document editor, from process manager to compiler, and from display driver to graphics editor. I perceived that many problems in software development stemmed from the mixing of parts written in different languages." (cite http://www.swissdelphicenter.ch/en/niklauswirth.php) )

Historically important innovations:

People: Niklaus Wirth

Retrospectives:

Notes:


1950s-era languages

Fortran

1957

People: John Backus

Opinions:

Tutorials:

Algol

1958

designed by committee

" Another milestone in the late 1950s was the publication, by a committee of American and European computer scientists, of "a new language for algorithms"; the ALGOL 60 Report (the "ALGOrithmic Language"). This report consolidated many ideas circulating at the time and featured three key language innovations:

    nested block structure: code sequences and associated declarations could be grouped into blocks without having to be turned into separate, explicitly named procedures;
    lexical scoping: a block could have its own private variables, procedures and functions, invisible to code outside that block, that is, information hiding.

Another innovation, related to this, was in how the language was described:

    a mathematically exact notation, Backus-Naur Form (BNF), was used to describe the language's syntax. Nearly all subsequent programming languages have used a variant of BNF to describe the context-free portion of their syntax.

Algol 60 was particularly influential in the design of later languages, some of which soon became more popular. The Burroughs large systems were designed to be programmed in an extended subset of Algol.

Algol's key ideas were continued, producing ALGOL 68:

    syntax and semantics became even more orthogonal, with anonymous routines, a recursive typing system with higher-order functions, etc.;
    not only the context-free part, but the full language syntax and semantics were defined formally, in terms of Van Wijngaarden grammar, a formalism designed specifically for this purpose.

Algol 68's many little-used language features (for example, concurrent and parallel blocks) and its complex system of syntactic shortcuts and automatic type coercions made it unpopular with implementers and gained it a reputation of being difficult. Niklaus Wirth actually walked out of the design committee to create the simpler Pascal language. " -- https://en.wikipedia.org/wiki/History_of_programming_languages#First_programming_languages

https://en.wikipedia.org/wiki/ALGOL

Influential Programming Languages, Part 1: ALGOL

http://www.jemarch.net/back-to-the-future-a68.pdf (Algol 68 is Jose E. Marchesi's favorite programming language [4])

Algol 68S

https://en.wikipedia.org/wiki/ALGOL_68S https://web.archive.org/web/20150402203041/https://www.eah-jena.de/~kleine/history/languages/Algol68-RR-Sublanguage.pdf

COBOL

1959

https://en.wikipedia.org/wiki/COBOL


Beginnings of OOP; 60s-70s era

Simula

1967

Historically important innovations:

Influences: ALGOL

Goals: discrete event simulation

People: Ole-Johan Dahl, Kristen Nygaard

Other notes:

Influential Programming Languages, Part 2: Simula

"C++, for example, was originally called "C with Classes" and was intended as a way of using Simula concepts in C, just as Objective-C was created to bring Smalltalk concepts to C." -- Influential Programming Languages, Part 2: Simula

Links:

Smalltalk

1972; due to its importance, has its own chapter, see [5]


Misc/unsorted languages

Pl/1

Ada

note: i think Ada is still used a lot for embedded systems, particularly in defence; maybe i should move it out of this chapter

Pros:

Notes:

Inspired:

People: Jean Ichbiah, John Barnes, Robert J. Firth, Mike Woodger, Tucker Taft

Features:

Retrospectives:

Tutorials:

Gotchas:

Examples:

    loop
      select
        when usage < capacity =>
          accept Push(value: in integer) do
            data[usage] := value;
            usage := usage + 1;
          end;
      or
        when usage > 0 =>
          accept Pop(value: out integer) do
            usage := usage - 1;
            value := data[usage];
          end;
      or
        terminate;
      end select;
    end loop;

from [10] "The beauty here is that inside the message handler, you know that the caller is blocked" [11] "It's a real rendezvous. Either the "client" or the "server" task is running." [12]

note: this language is still liked in some quarters, and maybe should be moved out of the 'historical interest' section.

Ada opinions

Ravenscar concurrency profile

"In Ada, creating tasks, synchronizing them, sharing access to resources, are part of the language...For real-time and embedded applications, Ada defines a profile called Ravenscar. It's a subset of the language designed to help schedulability analysis, it is also more compatible with platforms such as micro-controllers that have limited resources....One of the advantages of having tasking as part of the language standard is the portability, you can run the same Ravenscar application on Windows, Linux, MacOs? or an RTOS like VxWorks?. GNAT also provides a small stand alone run-time that implements the Ravenscar tasking on bare metal. This run-time is available, for instance, on ARM Cortex-M micro-controllers. It's like having an RTOS in your language.

...

Tasks

you can declare and implement a single task:

   --  Task declaration
   task My_Task;
   --  Task implementation
   task body My_Task is
   begin
      --  Do something cool here...
   end My_Task;

If you have multiple tasks doing the same job or if you are writing a library, you can define a task type ... One limitation of Ravenscar compared to full Ada, is that the number of tasks has to be known at compile time.

Time

...

     a definition of the Time type which represents the time elapsed since the start of the system
     a definition of the Time_Span type which represents a period between two Time values
     a function Clock that returns the current time (monotonic count since the start of the system)
     Various sub-programs to manipulate Time and Time_Span values

The Ada language also provides an instruction to suspend a task until a given point in time: delay until.

...

Scheduling

Ravenscar has priority-based preemptive scheduling. A priority is assigned to each task and the scheduler will make sure that the highest priority task - among the ready tasks - is executing.

A task can be preempted if another task of higher priority is released, either by an external event (interrupt) or at the expiration of its delay until statement (as seen above).

If two tasks have the same priority, they will be executed in the order they were released (FIFO within priorities).

Task priorities are static, however we will see below that a task can have its priority temporary escalated.

The task priority is an integer value between 1 and 256, higher value means higher priority. It is specified with the Priority aspect:

   Task My_Low_Priority_Task
     with Priority => 1;
   Task My_High_Priority_Task
     with Priority => 2;

Mutual exclusion and shared resources

In Ada, mutual exclusion is provided by the protected objects.

At run-time, the protected objects provide the following properties:

    There can be only one task executing a protected operation at a given time (mutual exclusion)
    There can be no deadlock 

In the Ravenscar profile, this is achieved with Priority Ceiling Protocol.

A priority is assigned to each protected object, any tasks calling a protected sub-program must have a priority below or equal to the priority of the protected object.

When a task calls a protected sub-program, its priority will be temporarily raised to the priority of the protected object. As a result, this task cannot be preempted by any of the other tasks that potentially use this protected object, and therefore the mutual exclusion is ensured.

The Priority Ceiling Protocol also provides a solution to the classic scheduling problem of priority inversion.

...

Synchronization

Another cool feature of protected objects is the synchronization between tasks.

It is done with a different kind of operation called an entry.

An entry has the same properties as a protected procedure except it will only be executed if a given condition is true. A task calling an entry will be suspended until the condition is true.

This feature can be used to synchronize tasks.

...

Interrupt Handling

Protected objects are also used for interrupt handling. Private procedures of a protected object can be attached to an interrupt using the Attach_Handler aspect.

" --- There's a mini-RTOS in my language by Fabien Chouteau

" Ada was designed through an iterative sequence of trials for a clean sheet implementation of a development language. It created, or popularized, ideas such as explicit module exports, tying directory and file names to classes, separate "to end of line" comments, and more." -- [19]

Ravenscar Practices

Ada variants and implementations

SPARK subset

"The aim when designing the SPARK subset of Ada was to create the largest possible subset of Ada that was still amenable to simple specification and sound verification.

The most notable restrictions from Ada are related to exceptions and access types, both of which are known to considerably increase the amount of user-written annotations required for full support. Goto statements and controlled types are also not supported since they introduce non-trivial control flow. The two remaining restrictions relate to side-effects in expressions and aliasing of names, which we now cover in more detail. " -- [21]

Ada links

APL

https://en.wikipedia.org/wiki/APL_%28programming_language%29

People: Kenneth E. Iverson

Succeeded by J.

Retrospectives:

Opinions:

This is not even to mention the fantastic sorts of other operators, like the recursive power of verb or the sort-of-monadic under that AFAICT have no near equivalent in numpy. " [22]

Links:

FP

Short for "function programming". Created support the "function-level programming" paradigm; this paradigm is different from "functional programming"; i think it may mean restricting oneself to programs generated by combining a set of primitive functions in a point-free style).

People: John Backus

Succeeded by FL.

Influenced Joy.

Links:

FL

People: Alexander Aiken, John Backus, John Williams, Edward Wimmers.

Successor to FP.

Influenced J.

Links:

PL/360

The first systems programming language. Written for the purpose of implementing ALGOL W. Sort of a 'high level assembly' or 'structured assembly language'. It has block structuring and control flow such as 'if' and 'while' and 'for' and 'case', but it also affords direct access to assembly registers. Written by Wirth, Wells Jr., and Satterthwaite Jr.

Keywords/symbols:

          + - * / ( ) = < > ^
          , ; . : @ # _ " ' !
          DO IF OF OR
          ABS AND END FOR NEG SYN XOR
          BASE BYTE CASE DATA ELSE GOTO LONG NULL
          REAL SHLA SHLL SHRA SHRL STEP THEN
          ARRAY BEGIN CLOSE DUMMY SHORT UNTIL WHILE
          COMMON EQUATE GLOBAL
          COMMENT INTEGER LOGICAL SEGMENT
          EXTERNAL FUNCTION REGISTER
          CHARACTER PROCEDURE

Links:

Hypercard

Links:

todo

SNOBOL

EIFFEL

Eiffel opinions: " marcellerusu 2 months ago

link

I’ve just started learning Eiffel and like what ive seen so far, just curious what do you consider its mistakes? hwayne 2 months ago

link
        CAT-calling
        Bertrand Meyer’s absolute refusal to use any standard terminology for anything in Eiffel. He calls nulls “voids”, lambdas “agents”, modules “clusters”, etc.
        Also his refusal to adopt any PL innovations past 1995, like all the contortions you have to do to get “void safety” (null safety) instead of just adding some dang sum types."

LOGO PL/1 https://en.wikipedia.org/wiki/PL/I#Teaching_subset_compilers DART OCCAM

---

https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md

https://web.archive.org/web/20210301031609/http://hopl.info/

https://www.digibarn.com/collections/posters/tongues/

https://hackaday.com/2015/11/03/no-pascal-not-a-snobols-chance-go-forth/

---

https://increment.com/programming-languages/language-history/

The seven programming ur-languages (ALGOL, Lisp, ML, Self, Forth, APL, Prolog)

https://courses.cs.washington.edu/courses/cse341/02sp/concepts/families.html

" Imperative (procedural) language family:

    Fortran
    Algol family:
        Algol-60
        Pascal
        Modula-X
        Ada 
    BCPL, C
    Lisp, Scheme (both have functional subsets) 

Object-Oriented Languages

    Simula (1960s)
    Smalltalk (1970s-present)
    C++, Objective C
    Common Lisp Object System (CLOS)
    Java 

Functional Languages

    Miranda
    ML
    Haskell 

Logic Programming Languages

    Prolog
    CLP(R) 

Lots of others: APL, PL/I, Cobol, Snobol, Icon, Tk/Tcl, Perl, ZPL, ... " -- https://www.cl.cam.ac.uk/teaching/1718/ConceptsPL/lectures.pdf

" Program execution model Good language design presents abstract machine. I Fortran: Flat register machine; memory arranged as linear array I Lisp: cons cells, read-eval-print loop I Algol family: stack of activation records; heap storage I BCPL, C: underlying machine + abstractions I Simula: Object references I FP, ML: functions are basic control structure I Smalltalk: objects and methods, communicating by messages " -- https://www.cl.cam.ac.uk/teaching/1718/ConceptsPL/lectures.pdf

" Part A: Meet the ancestors II. The first procedural language: FORTRAN (1954–58). III. The first declarative language: LISP (1958–62). IV. Block-structured languages: Algol (1958–68), Pascal (1970). V. Object-oriented languages: Simula (1964–67), Smalltalk (1972). Part B: Types and related ideas VI. Types in programming languages: ML, Java. VII. Scripting Languages: JavaScript?. VIII. Data abstraction and modularity: SML Modules. Part C: Distributed concurrency, Java lambdas, Scala, Monads IX. Languages for concurrency and parallelism. X. Functional-style programming meets object-orientation. XI. Miscellaneous concepts: Monads, GADTs. " -- https://www.cl.cam.ac.uk/teaching/1718/ConceptsPL/lectures.pdf

https://www.cs.fsu.edu/~engelen/courses/COP402004/notes1.html

https://digitalcommons.newhaven.edu/cgi/viewcontent.cgi?article=1000&context=electricalcomputerengineering-books

https://madhadron.com/posts/2009-11-13-a-perspective-on-four-languages.html

https://cs.nyu.edu/~jcf/classes/CSCI-GA.2110-001/slides/session1/IntroductionToProgrammingLanguagesAndSyntax.pdf slides: Classifying Programming Languages, PL Genealogy, and nearby slides

https://en.wikipedia.org/wiki/List_of_programming_languages_by_type