Next: The Go Project, Up: Introduction to Go [Index]
The figure below shows the most important influences of earlier programming languages on the design of Go.
C
Go
is sometimes described as a “C-like language,” or as “C for the 21st
century.” From C
, Go
inherited its:
Niklaus Wirth: Pascal, Modula-2, Oberon, Oberon-2, Project Oberson
But there are other ancestors in Go’s family tree. One major stream of influence comes from languages by Niklaus Wirth,
Pascal
.
Modula-2
inspired the package concept.
Oberon
eliminated the distinction between module interface files and
module implementation files.
Oberon-2
influenced the syntax for packages, imports, and
declarations, and
Object Oberon
provided the syntax for method declarations.
Tony Hoare: Communicating Sequential Processes (CSP)
Another lineage among Go’s ancestors, and one that makes Go
distinctive among
recent programming languages, is a sequence of little-known research languages
developed at Bell Labs, all inspired by the concept of communicating
sequential processes (CSP
) from Tony Hoare’s seminal 1978 paper on the
foundations of concurrency.
CSP
, a program is a parallel composition of processes that have no
shared state;
But Hoare’s CSP
was a formal language for describing the fundamental concepts
of concurrency, not a programming language for writing executable programs.
Rob Pike: Squeak, Newsqueak
Rob Pike and others began to experiment with CSP
implementations as actual
languages.
Squeak
(‘‘A language for communicating with mice’’),
which provided a language for handling mouse and keyboard events, with
statically created channels.
Newsqueak
, which offered C-like statement and
expression syntax and Pascal-like type notation. It was a purely functional
language with garbage collection, again aimed at managing keyboard, mouse,
and window events. Channels became first-class values, dynami- cally
created and storable in variables.
Plan 9: Alef
The Plan 9
operating system carried these ideas forward in a language called
Alef
. Alef
tried to make Newsqueak
a viable system programming language,
but its omission of garbage collection made concurrency too painful.
Miscellaneous Others
Other constructions in Go
show the influence of non-ancestral genes here and
there;
iota
is loosely from APL
, and
Scheme
(and most languages
since).
Here too we find novel mutations.
slices
provide dynamic arrays with efficient random
access but also permit sophisticated sharing arrangements reminiscent of linked lists.
defer
statement is new with Go.
Next: The Go Project, Up: Introduction to Go [Index]