SlideShare a Scribd company logo
Or,	
  why	
  long	
  dead	
  programming	
  languages	
  matter	
  
  My	
  motivation?	
  	
  
  Developer	
  with	
  an	
  interest	
  in	
  PL	
  design	
  &	
  implementation,	
  
paradigms,	
  and	
  history.	
  
  Interested	
  in	
  questions	
  like:	
  is	
  PL	
  X	
  suitable	
  for	
  task	
  Y?	
  
  Lisp’s	
  50th	
  2	
  years	
  ago:	
  Clojure	
  talk	
  at	
  AJUG	
  in	
  2008	
  
  Before	
  this	
  talk	
  I	
  hadn’t	
  written	
  any	
  Algol;	
  lots	
  of	
  Pascal	
  
  Have	
  you?	
  	
  
  Contribute	
  anecdotes…	
  	
  
  This	
  is	
  a	
  BIG	
  topic.	
  
  The	
  amount	
  of	
  material	
  available	
  re:	
  Algol	
  is	
  overwhelming	
  
  Have	
  done	
  my	
  best	
  to	
  extract	
  the	
  key	
  points	
  
 Algol:	
  the	
  Demon	
  Star	
  
 Algol:	
  the	
  ALgOrithmic	
  Language	
  
  IAL	
  &	
  Algol	
  60	
  
  Motivations	
  
  Features	
  and	
  contributions	
  
  Problems	
  
  Implementations	
  (then	
  and	
  now)	
  
  The	
  Children	
  of	
  Algol	
  60	
  
  “Algol-­‐like”	
  languages	
  
  Algol	
  is	
  Dead:	
  Long	
  Live	
  Algol	
  
  The	
  failure	
  of	
  Algol	
  60	
  
  The	
  legacy	
  of	
  Algol	
  60	
  
•  Algol:	
  Beta	
  Persei	
  
•  Arabic	
  ra's	
  al-­‐ghūl	
  from	
  head	
  
of	
  the	
  demon/ogre/ghoul	
  
(Gorgon	
  Medusa)	
  
•  Also:	
  Demon	
  Star	
  or	
  Blinking	
  
Demon	
  
•  Distance:	
  92.8	
  light	
  years	
  
•  Orbital	
  Period:	
  2.87	
  days	
  
•  Separation:	
  0.06	
  AU	
  
•  Variability	
  recorded	
  in	
  1667;	
  	
  
•  probably	
  known	
  much	
  earlier	
  
Algol	
  images	
  x	
  2	
  taken	
  from	
  this	
  video:	
  http://www.citizensky.org/forum/cs-­‐video-­‐and-­‐planetarium-­‐show-­‐wtimothy-­‐ferris	
  
“One	
  member	
  of	
  the	
  ALGOL	
  committee	
  ruefully	
  noted	
  
that	
  the	
  name	
  ALGOL,	
  	
  a	
  contraction	
  of	
  Algorithmic	
  
Language,	
  was	
  also	
  the	
  name	
  of	
  a	
  star	
  whose	
  English	
  
translation	
  was	
  “the	
  Ghoul”.	
  Whatever	
  the	
  reason	
  for	
  
its	
  ill-­‐fate,	
  ALGOL	
  nonetheless	
  was	
  influential	
  on	
  later	
  
languages.”	
  (Ceruzzi,	
  p	
  95)	
  
“Lisp	
  and	
  Algol,	
  are	
  built	
  around	
  a	
  kernel	
  that	
  	
  seems	
  as	
  
natural	
  as	
  a	
  branch	
  of	
  mathematics.”	
  	
  
(Metamagical	
  Themas,	
  Douglas	
  Hofstadter)	
  
"Here	
  is	
  a	
  language	
  so	
  far	
  ahead	
  of	
  its	
  time	
  that	
  it	
  was	
  not	
  
only	
  an	
  improvement	
  on	
  its	
  predecessors	
  but	
  also	
  on	
  nearly	
  
all	
  its	
  successors.”	
  	
  
(1980	
  Turing	
  Award	
  Lecture,	
  C.A.R.	
  Hoare)	
  
“Algol	
  60	
  lives	
  on	
  in	
  the	
  genes	
  of	
  Scheme	
  and	
  Pascal.”	
  
(SICP,	
  Abelson	
  &	
  Sussman)	
  
begin
integer result;
integer procedure fact(n);
value n; integer n;
fact := if n = 0 then 1 else n * fact(n-1);
result := fact(5);
outinteger (1, result);
outstring (1, "n")
end
A	
  familiar	
  style	
  for	
  Pascal,	
  Delphi,	
  Modula-­‐2	
  programmers.	
  
  Zuse	
  published	
  details	
  of	
  an	
  algorithmic	
  language	
  (Plankalkül)	
  in	
  1948;	
  did	
  not	
  
receive	
  much	
  attention	
  for	
  decades.	
  
  Rutihauser	
  showed	
  in-­‐principle	
  translation	
  by	
  computer	
  of	
  simple	
  formulae	
  
and	
  loop	
  control	
  in	
  1951.	
  
  Boehm	
  published	
  method	
  to	
  translate	
  algebraic	
  formulae	
  in	
  computer	
  notation	
  
in	
  1954.	
  
  Similar	
  attempts	
  were	
  made	
  by	
  Glennie	
  (1952,	
  UK)	
  and	
  Liapunov	
  (1959,	
  Russia).	
  
  Adams	
  and	
  Laning	
  presented	
  an	
  algorithmic	
  language	
  in	
  1954;	
  first	
  actually	
  
used	
  (Europe).	
  
  IBM	
  released	
  Fortran	
  in	
  1954.	
  Previously	
  in	
  the	
  US,	
  machine-­‐specific	
  assembly	
  
languages	
  had	
  been	
  in	
  use.	
  
  An	
  automatic	
  computing	
  symposium	
  was	
  held	
  in	
  1955	
  in	
  Darmstadt	
  
  translation	
  of	
  algorithmic	
  languages	
  into	
  machine	
  code	
  was	
  discussed;	
  
  Rutihauser	
  	
  and	
  others	
  stressed	
  the	
  need	
  for	
  a	
  universal,	
  machine-­‐independent	
  
algorithmic	
  language.	
  
  Flow-­‐Matic	
  (1958):	
  pre-­‐cursor	
  of	
  COBOL;	
  others	
  by	
  Grace	
  Murray	
  Hopper	
  
  Math-­‐Matic	
  (1957):	
  intended	
  as	
  improvement	
  over	
  Fortran;	
  “Algol”	
  contender	
  
  By	
  mid	
  1950’s,	
  need	
  for	
  a	
  universal	
  machine	
  independent	
  PL	
  was	
  
becoming	
  apparent.	
  	
  
  Key	
  issue:	
  portability	
  
  Passing	
  of	
  time	
  aggravated	
  problem:	
  more	
  PLs	
  and	
  more	
  programs	
  
written	
  in	
  those	
  languages	
  
  GAMM	
  (a	
  European	
  association	
  for	
  applied	
  mathematics	
  and	
  
mechanics)	
  created	
  a	
  committee	
  to	
  look	
  at	
  developing	
  such	
  a	
  
language.	
  
  In	
  1957,	
  ACM	
  and	
  user	
  groups	
  such	
  as	
  SHARE	
  formed	
  a	
  
committee	
  to	
  “…study	
  and	
  recommend	
  action	
  for	
  the	
  creation	
  of	
  
a	
  universal	
  programming	
  language.”	
  (MacLennan,	
  p	
  99)	
  
  In	
  October	
  1957,	
  GAMM	
  proposed	
  to	
  ACM	
  a	
  joint	
  effort.	
  
 It	
  should	
  be	
  as	
  close	
  as	
  possible	
  to	
  standard	
  
mathematical	
  notation	
  and	
  be	
  readable	
  without	
  too	
  
much	
  additional	
  explanation.	
  
  Naur	
  thinks	
  Algol	
  (in	
  general)	
  failed	
  on	
  this	
  count.	
  
 It	
  should	
  be	
  possible	
  to	
  use	
  it	
  for	
  the	
  description	
  of	
  
computing	
  processes	
  in	
  publications.	
  
  It	
  set	
  the	
  standard	
  for	
  at	
  least	
  next	
  30	
  years.	
  
  Naur	
  thinks	
  this	
  is	
  the	
  most	
  frequent	
  use	
  of	
  Algol	
  60.	
  
 It	
  should	
  be	
  mechanically	
  translatable	
  into	
  machine	
  
programs.	
  
  BNF	
  and	
  syntax-­‐directed	
  compiler	
  tools	
  
  IAL:	
  International	
  Algebraic	
  Language	
  
  Created	
  in	
  Zurich	
  meeting	
  over	
  8	
  days	
  by	
  8	
  people.	
  
  Many	
  IBM	
  users	
  suggested	
  abandoning	
  Fortran,	
  backing	
  Algol	
  
  IBM	
  decided	
  against	
  that	
  (understandably)	
  
  Implementations	
  for	
  many	
  dialects	
  appeared,	
  e.g.	
  
  JOVIAL	
  (by	
  Jule’s	
  Schwartz)	
  
  Jule’s	
  Own	
  Version	
  of	
  the	
  International	
  Algebraic	
  Language	
  
  Still	
  in	
  use	
  by	
  USAF;	
  for	
  military	
  aircraft	
  embedded	
  systems	
  
  NELIAC:	
  Navy	
  Electronic	
  Laboratories	
  International	
  Algol	
  
Compiler	
  
  MAD:	
  Michigan	
  Algorithm	
  Decoder	
  (IBM,	
  UNIVAC).	
  	
  
  Early	
  dialects	
  diminished	
  value	
  of	
  universal	
  language	
  committing	
  
users	
  to	
  obsolete	
  versions.	
  	
  	
  
“What	
  can	
  be	
  said	
  at	
  all	
  can	
  be	
  said	
  clearly;	
  and	
  what	
  
we	
  cannot	
  talk	
  about	
  we	
  must	
  pass	
  over	
  in	
  silence.”	
  
[Was	
  sich	
  überhaupt	
  sagen	
  läßt,	
  läßt	
  sich	
  klar	
  sagen;	
  
und	
  wovon	
  man	
  nicht	
  reden	
  kann,	
  darüber	
  muß	
  man	
  
schweigen.]	
  
(Ludwig	
  Wittgensten,	
  Tractatus	
  Logico	
  Philosophicus,	
  1921)	
  
  Peter	
  Naur	
  (Editor)	
  
  Backus,	
  Bauer,	
  Green,	
  Katz,	
  McCarthy,	
  Perlis,	
  Rutihauser,	
  Samelson,	
  
Vauquois,	
  Wegstein,	
  van	
  Wijngaarden,	
  Woodger	
  
  Formal	
  syntax	
  via	
  Backus-­‐Naur	
  Form	
  (BNF)	
  
  Informal,	
  semantics	
  and	
  examples	
  for	
  each	
  syntactic	
  construct	
  
  Short:	
  15	
  pages!	
  Common	
  Lisp:	
  ~450	
  pages	
  
  In	
  1970s,	
  Scheme	
  paid	
  tribute	
  to	
  Algol	
  60	
  with	
  the	
  Report	
  on	
  the	
  
Algorithmic	
  Language	
  Scheme	
  
  BNF	
  and	
  formal	
  (operational)	
  semantics	
  
  Started	
  out	
  short;	
  even	
  in	
  its	
  6th	
  revision,	
  still	
  only	
  90	
  pages	
  
  1958:	
  Preliminary	
  report	
  on	
  Algol,	
  Zürich	
  meeting	
  
  intention	
  was	
  to	
  collect	
  comments/criticisms	
  until	
  final	
  November	
  1959	
  
design	
  meeting;	
  meant	
  to	
  be	
  an	
  interim	
  report	
  
  1958:	
  Informal	
  meeting	
  in	
  Mainz	
  (40	
  people)	
  
  1959:	
  Copenhagen	
  Algol	
  implementation	
  meeting	
  
  led	
  to	
  creation	
  of	
  	
  regular	
  “Algol	
  Bulletin”	
  by	
  Naur	
  
  November	
  1959:	
  Paris	
  UNESCO	
  Algol	
  conference	
  
  Backus	
  presented	
  syntax	
  of	
  Algol	
  in	
  a	
  formal	
  notation	
  he	
  had	
  
developed;	
  based	
  in	
  part	
  on	
  his	
  work	
  in	
  Fortran	
  	
  
  November	
  1959:	
  ACM	
  Committee	
  
  considered	
  comments	
  sent	
  to	
  Communications	
  of	
  the	
  ACM	
  
  industry	
  reps,	
  e.g.	
  SHARE,	
  USE	
  participated	
  	
  
  December	
  1959:	
  Preparatory	
  Boston	
  meeting	
  for	
  7	
  US	
  delegates	
  
  January	
  1960:	
  International	
  Algol	
  meeting	
  
  7	
  European	
  representatives	
  selected	
  from	
  Paris	
  
  various	
  language	
  changes	
  discussed	
  (see	
  Perlis,	
  1974)	
  	
  
  May	
  1960:	
  Report	
  on	
  the	
  Algorithmic	
  Language	
  Algol	
  60	
  
  1962:	
  Meeting	
  in	
  Rome	
  to	
  resolve	
  remaining	
  errors	
  &	
  ambiguities	
  	
  
  1963:	
  Revised	
  Report	
  on	
  the	
  Algorithmic	
  Language	
  Algol	
  60	
  	
  
  Focus:	
  machine	
  independence	
  and	
  portability	
  
  Strong,	
  static	
  typing	
  (no	
  implicits)	
  
  integer,	
  real,	
  Boolean,	
  arrays,	
  string	
  literals	
  as	
  parameters	
  
  Block	
  structure	
  and	
  compound	
  statements	
  
  Lexical	
  (static)	
  vs	
  dynamic	
  scope,	
  Fortran	
  COMMON	
  
  Free	
  vs	
  fixed	
  format	
  due	
  to	
  input	
  device	
  variety:	
  
  80	
  or	
  90	
  column	
  punched	
  cards;	
  
  Teletype;	
  
  Punched	
  paper	
  tape;	
  
  Forced	
  programmers	
  to	
  think	
  about	
  code	
  structure.	
  	
  
  By	
  contrast:	
  Fortran	
  constrains	
  format,	
  Python	
  enforces	
  structure.	
  
  Fortran	
  format	
  and	
  I/O	
  heavily	
  influenced	
  by	
  IBM	
  704.	
  
Watson,	
  1975	
  
 Arrays	
  
  Upper	
  and	
  lower	
  limits	
  can	
  be	
  specified	
  
  Arbitrary	
  number	
  of	
  dimensions	
  
  Arbitrary	
  subscript	
  expressions	
  
  Bounds	
  checked	
  at	
  run-­‐time	
  
 Procedures	
  
  Call-­‐by-­‐value	
  and	
  Call-­‐by-­‐name	
  
  Recursion	
  (in	
  Lisp	
  previously,	
  not	
  imperative	
  PLs)	
  
  Implicit	
  use	
  of	
  stacks	
  for	
  scopes,	
  activation	
  records	
  
 Generalised	
  Fortran’s	
  control	
  constructs	
  (if,	
  do)	
  
 own	
  keyword	
  ala	
  static	
  variables	
  in	
  C	
  	
  
 Backus-­‐Naur	
  Form	
  to	
  describe	
  syntax	
  
 Character	
  set	
  independence	
  via	
  different	
  
representations	
  
  More	
  on	
  these	
  later	
  
begin
integer result;
integer procedure fact(n);
value n;
integer n;
begin
if n = 0 then
fact := 1
else
fact := n * fact(n-1)
end;
result := fact(5);
print(result)
end
begin
integer result;
integer procedure fact(n);
value n;
integer n;
begin
if n = 0 then
fact := 1
else
fact := n * fact(n-1)
end;
result := fact(5);
print(result)
end
c	
  Main	
  program	
  
	
  	
  	
  	
  	
  	
  …	
  
c	
  common	
  arrays	
  
	
  	
  	
  	
  	
  	
  real*8	
  tvec,xvec	
  
	
  	
  	
  	
  	
  	
  common/datapts/tvec(1000000),xvec(1000000)	
  
	
  	
  	
  	
  	
  	
  …	
  
	
  	
  	
  	
  	
  	
  integer	
  n	
  
	
  	
  	
  	
  	
  	
  …	
  
	
  	
  	
  	
  	
  	
  subroutine	
  average	
  
c	
  common	
  arrays	
  
	
  	
  	
  	
  	
  	
  real*8	
  tvec,xvec	
  
	
  	
  	
  	
  	
  	
  common/datapts/tvec(1000000),xvec(1000000)	
  
	
  	
  	
  	
  	
  	
  …	
  
 In	
  dynamic	
  scoping	
  the	
  meanings	
  of	
  statements	
  and	
  
expressions	
  are	
  determined	
  by	
  the	
  dynamic	
  structure	
  
of	
  the	
  computations	
  evolving	
  in	
  time.	
  
 In	
  lexical	
  scoping	
  the	
  meanings	
  of	
  statements	
  and	
  
expressions	
  are	
  determined	
  by	
  the	
  static	
  structure	
  of	
  
the	
  program.	
  (MacLennan,	
  p	
  119)	
  
 Early	
  versions	
  of	
  Lisp	
  used	
  dynamic	
  scoping.	
  
 Before	
  version	
  5,	
  Perl	
  only	
  had	
  the	
  local	
  keyword	
  
which	
  denoted	
  dynamic	
  scoping.	
  Perl	
  5	
  added	
  static	
  
scoping	
  via	
  my	
  keyword.	
  	
  
begin
real procedure f(x);
value x; real x;
f := x**2 + 1;
real procedure sum(n, m, inc);
value n,m,inc; real n,m,inc;
begin
real s,x; s := 0;
for x := n step inc until m do
s := s + f(x);
sum := s
end;
print(sum(1, 10, 0.1))
end
begin
real procedure sum(n, m, inc);
value n,m,inc; real n,m,inc;
begin
real s,x; s := 0;
for x := n step inc until m do
s := s + f(x);
sum := s
end;
begin
real procedure f(x);
value x; real x;
f := x**2 + 1;
print(sum(1, 10, 0.1))
end
end
begin
real procedure helper(x);
value x; real x;
comment Does something expected for f;
helper := x*x;
real procedure f(n);
value n; real n;
f := helper(n) + 1;
begin
real procedure helper(x);
value x; real x;
comment Does something else…;
helper := x*x*x;
print(f(5))
end
end
dynamic:	
  126	
  
lexical:	
  26	
  
∑
n
x =
i=1
1
i
—
begin
comment Jensen's device using Algol 60's
default Call-by-name parameter
passing convention.;
integer idx;
real procedure sum (i, lo, hi, term);
value lo, hi; integer i, lo, hi;
real term;
comment: term and i are passed by name;
begin
real temp; temp := 0;
for i := lo step 1 until hi do
temp := temp + term;
sum := temp
end;
print(sum(idx, 1, 100, 1/idx))
end
begin
comment Inlined Jensen's Device.;
integer lo, hi;
integer idx;
real sum;
begin
real temp;
lo := 1;
hi := 100;
temp := 0;
for idx := 1 step lo until hi do
temp := temp + 1/idx;
sum := temp
end;
print(sum);
end
  It	
  is	
  as	
  if	
  the	
  function’s	
  formal	
  parameters	
  are	
  bound	
  to	
  the	
  
named	
  entity	
  ,	
  e.g.	
  term	
  is	
  bound	
  to	
  ‘1/idx’.	
  
  The	
  usual	
  implementation	
  is	
  via	
  so-­‐called	
  thunks.	
  
  http://en.wikipedia.org/wiki/Thunk
  Parameterless,	
  anonymous,	
  unseen	
  function.	
  
  “…delays	
  the	
  computation	
  of	
  a	
  function's	
  argument,	
  and	
  the	
  
function	
  forces	
  the	
  thunk	
  to	
  obtain	
  the	
  actual	
  value.”	
  
  Value	
  returned	
  is	
  lvalue	
  or	
  rvalue	
  depending	
  upon	
  whether	
  on	
  
left	
  or	
  right	
  hand	
  side	
  of	
  an	
  assignment.	
  
  Thunks	
  are	
  still	
  used	
  by	
  functional	
  languages	
  such	
  as	
  
Haskell	
  and	
  Scala	
  to	
  implement	
  code	
  blocks	
  whose	
  
invocation	
  is	
  to	
  be	
  delayed	
  and	
  re-­‐evaluated.	
  
begin
integer k;
integer array A[1:5];
procedure inc2(i, j);
integer i, j;
begin
i := i+1;
j := j+1
end;
k := 1;
A[k] := 2; A[2] := 0;
inc2(k, A[k]);
print(k, A[k])
end
call-­‐by-­‐name:	
  2	
  	
  1	
  
call-­‐by-­‐reference:	
  2	
  	
  3	
  
begin
integer k;
integer array A[1:5];
k := 1;
A[k] := 2; A[2] := 0;
begin
k := k+1;
A[k] := A[k]+1
end;
print(k, A[k])
end
begin
integer i;
integer array a[1:27];
procedure swap(x,y);
integer x,y;
begin
integer temp;
temp := x;
x := y;
y := temp
end;
a[1] := 27;
i := 1;
swap(i, a[i])
end
begin
integer temp;
temp := i;
i := a[i];
a[i] := temp
end;	
  
begin
integer temp;
temp := 1;
i := 27;
a[27] := temp
end;	
   Instead	
  of	
  (i,	
  a[1])	
  
being	
  swapped	
  from	
  
(1,	
  27)	
  to	
  (27,	
  1)	
  we	
  get:	
  
(27,	
  27)	
  since:	
  
i	
  =	
  27	
  
a[1]	
  =	
  27	
  (unchanged)	
  
a[27]	
  =	
  1	
  
 It	
  is	
  not	
  possible	
  to	
  write	
  a	
  general	
  swap	
  procedure	
  in	
  
Algol	
  60.	
  Call-­‐by-­‐name	
  (aka	
  call-­‐by-­‐name)	
  has	
  odd	
  
side	
  effects.	
  Some	
  combinations	
  of	
  parameters	
  work.	
  
 Algol	
  68	
  and	
  other	
  languages	
  since	
  Algol	
  60	
  have	
  
abandoned	
  call-­‐by-­‐name	
  in	
  favour	
  of	
  the	
  now	
  familiar	
  
(and	
  less	
  expensive)	
  call-­‐by-­‐reference	
  in	
  which	
  the	
  
address	
  of	
  the	
  object	
  is	
  passed.	
  
 Thunks	
  still	
  have	
  a	
  role	
  to	
  play,	
  as	
  mentioned.	
  	
  
“Peter	
  Naur,	
  then	
  the	
  editor	
  of	
  the	
  Algol	
  Bulletin,	
  was	
  
surprised	
  because	
  Backus’s	
  definition	
  of	
  Algol-­‐58	
  did	
  
not	
  agree	
  with	
  his	
  interpretation	
  of	
  the	
  Algol-­‐58	
  
report.	
  He	
  took	
  this	
  as	
  an	
  indication	
  that	
  a	
  more	
  
precise	
  method	
  of	
  describing	
  syntax	
  was	
  required	
  and	
  
prepared	
  some	
  samples	
  of	
  a	
  variant	
  of	
  the	
  Backus	
  
notation.	
  As	
  a	
  result,	
  this	
  notation	
  was	
  adopted	
  for	
  the	
  
Algol-­‐60	
  report…”	
  
(MacLennan,	
  p	
  101)	
  
  Chomsky	
  type	
  0:	
  recursively	
  enumerable	
  
  Chomsky	
  type	
  1:	
  context-­‐sensitive	
  
  Chomsky	
  type	
  2:	
  context-­‐free	
  
  Chomsky	
  type	
  3:	
  regular	
  
  BNF	
  corresponds	
  directly	
  to	
  Chomsky	
  type	
  2.	
  
  Enabled	
  mathematical	
  analysis	
  of	
  PL	
  grammar.	
  
  Led	
  to	
  development	
  of	
  automatic	
  parser	
  generators	
  
  e.g.	
  META	
  II	
  used	
  for	
  VALGOL	
  implementation	
  
  later,	
  extended	
  BNF	
  
  current	
  tools,	
  e.g.	
  yacc,	
  ANTLR	
  
<for list element> ::= <arithmetic expression> |
<arithmetic expression> step
<arithmetic expression>
until <arithmetic expression> |
<arithmetic expression> while
<Boolean expression>
<for list> ::= <for list element> |
<for list> , <for list element>
<for clause> ::= for <variable> := <for list> do
<for statement> ::= <for clause> <statement> |
<label>: <for statement>
  Examples	
  of	
  for	
  loop	
  syntax	
  based	
  upon	
  BNF:	
  
for q:=1 step s until n do A[q]:=B[q]
for i := 1 step 1 until 100 do
begin
x := i * 2;
A[i] := x
end
for k:=1,V12 while V1<N do
for days := 31, if leap then 29 else 28,
31, 30, 31, 30, 31, 31, 30, 31, 30, 31
do 	
  
  Edsger	
  Dijkstra	
  wrote	
  	
  a	
  letter	
  to	
  the	
  editor	
  of	
  the	
  March	
  
1968	
  CACM	
  that	
  appeared	
  as	
  “GoTo-­‐Statement	
  Considered	
  
Harmful”:	
  
“For	
  a	
  number	
  of	
  years	
  I	
  have	
  been	
  familiar	
  with	
  the	
  
observation	
  that	
  the	
  quality	
  of	
  programmers	
  is	
  a	
  decreasing	
  
function	
  of	
  the	
  frequency	
  of	
  go	
  to	
  statements	
  in	
  the	
  programs	
  
they	
  produce.”	
  (Ceruzzi,	
  p	
  100)	
  
  This	
  resulted	
  in	
  a	
  “goto	
  controversy”	
  that	
  lasted	
  a	
  few	
  years.	
  
  Added	
  to	
  the	
  push	
  towards	
  Structured	
  Programming.	
  	
  
 Diminished	
  need	
  for	
  GOTO	
  in	
  Algol	
  vs	
  Fortran:	
  
  Block	
  structure	
  
  Improved	
  control	
  constructs	
  
 However,	
  still	
  present	
  in	
  Algol	
  
 The	
  expense	
  of	
  GOTO	
  in	
  Algol	
  60	
  
  GOTO	
  statements	
  can	
  be	
  complex,	
  e.g.	
  
  goto if a<b then exit else L[if b<=3 then b else 4];	
   	
  
  Popping	
  of	
  activation	
  records	
  
begin
integer a, b;
switch L := first, second, third, exit;
inreal(0, a);
inreal(0, b);
goto if a<b then exit else L[if b<=3 then b else 4];
first:
print("first");
goto exit;
second:
print("second");
goto exit;
third:
print("third");
goto exit;
exit:
end
ERK!	
  
a: begin
b: begin
integer i;
for i:=1 step 1 until 100 do
begin
outinteger(1, i*i);
if i*i > 9 then goto exit
end
end;
comment activation records must
be popped to get here; worse if
goto from within recursive procedure.;
exit:
outstring(1, "exitedn")
end
 Now	
  
  marst	
  compiler	
  (under	
  GPL):	
  generates	
  C	
  
  A60	
  interpreter	
  
 In	
  the	
  decade	
  following	
  the	
  Algol	
  60	
  Report	
  
  Elliot	
  Algol	
  (Hoare,	
  Dijkstra)	
  
  Burroughs	
  Algol	
  
  VALGOL	
  via	
  META-­‐II	
  compiler-­‐compiler	
  
  http://en.wikipedia.org/wiki/ALGOL_60	
  
  Reference	
  Language	
  
  The	
  working	
  language	
  of	
  the	
  committee	
  
  The	
  defining	
  language;	
  used	
  in	
  Algol	
  60	
  Report	
  
  Character	
  set	
  chosen	
  to	
  illuminate	
  
  Basic	
  reference	
  and	
  guide	
  for	
  compiler	
  builders	
  
  Publication	
  Language	
  
  To	
  be	
  used	
  for	
  communicating	
  algorithms	
  
  Character	
  set	
  may	
  be	
  richer,	
  may	
  vary	
  by	
  country	
  
  Hardware	
  Representation	
  
  Constrained	
  by	
  input	
  device	
  and	
  character	
  set	
  of	
  target	
  computer	
  
  Must	
  specify	
  rules	
  to	
  map	
  from	
  reference	
  language	
  
  See	
  Algol	
  60	
  Report	
  (Naur	
  1960)	
  
class Complex(x,y);
real x,y;
begin
real re, im;
real procedure RealPart;
begin
RealPart := re;
end;
…
procedure Add(other);
begin
re := re + other.RealPart;
…
 Algol	
  was	
  competing	
  against	
  Fortran	
  in	
  the	
  scientific	
  
languages	
  arena.	
  
 European	
  committee	
  members	
  more	
  committed	
  to	
  
cause	
  of	
  single	
  universal	
  language	
  than	
  US	
  members	
  
who	
  were	
  engaged	
  in	
  other	
  language	
  projects.	
  (Perlis,	
  
1974)	
  
 Nofre	
  (2010)	
  suggests	
  Algol’s	
  lack	
  of	
  adoption	
  had	
  
more	
  to	
  do	
  with	
  diversity	
  vs	
  uniformity:	
  	
  
  UNCOL	
  (SHARE	
  sponsored)	
  vs	
  Algol	
  60	
  
 Lack	
  of	
  standard	
  I/O	
  or	
  library	
  writing	
  capability	
  
  fixed	
  in	
  Algol	
  68	
  (transput)	
  
 Call-­‐by-­‐name	
  problem	
  
  fixed	
  in	
  Algol	
  68	
  (call-­‐by-­‐ref)	
  
 Paucity	
  of	
  types,	
  e.g.	
  no	
  complex	
  type,	
  strings	
  as	
  2nd	
  
class	
  citizens	
  
  fixed	
  in	
  Simula,	
  Algol	
  68	
  
 Baroque	
  language	
  features:	
  for,	
  switch/goto	
  
 No	
  separate	
  compilation	
  
  Fixed	
  in	
  Algol	
  68	
  (modules),	
  Ada	
  (packages),	
  OO	
  langs	
  
  We’ve	
  talked	
  about	
  Algol’s	
  contributions:	
  
  Language	
  innovations	
  
  Influenced	
  most	
  subsequent	
  languages	
  
  BNF,	
  syntax	
  directed	
  compiler	
  design	
  
  Algol	
  60	
  as	
  a	
  publication	
  language	
  
  set	
  the	
  standard	
  for	
  years	
  
  Also	
  influenced	
  machine	
  architecture,	
  e.g.	
  dynamic	
  
allocation	
  of	
  storage	
  for	
  variables	
  (ICL,	
  Burroughs).	
  
  Many	
  processors	
  today	
  have	
  machine	
  instructions	
  that	
  cater	
  
for	
  Algol-­‐style	
  activation	
  records.	
  
  But,	
  experience	
  with	
  machine	
  implementation	
  was	
  also	
  
leading	
  this	
  way.	
  
“Algol’s	
  is	
  the	
  linguistic	
  form	
  most	
  widely	
  used	
  in	
  
describing	
  the	
  new	
  exotic	
  algorithms…Where	
  
important	
  new	
  linguistic	
  inventions	
  have	
  occurred,	
  
they	
  have	
  been	
  imbedded	
  usually	
  within	
  an	
  Algol	
  
framework,	
  e.g.	
  records,	
  classes,	
  definitions	
  of	
  types	
  
and	
  their	
  operations,…,modules.	
  Algol	
  has	
  become	
  so	
  
ingrained	
  in	
  our	
  thinking	
  about	
  programming	
  that	
  we	
  
almost	
  automatically	
  base	
  investigations	
  in	
  abstract	
  
programming	
  on	
  an	
  Algol	
  representation	
  to	
  isolate,	
  
define,	
  and	
  explicate	
  our	
  ideas…It	
  was	
  a	
  noble	
  begin	
  
but	
  never	
  intended	
  to	
  be	
  a	
  satisfactory	
  end.”	
  
(Perlis,	
  1978)	
  
  Knuth,	
  D.,	
  Backus	
  Normal	
  Form	
  vs	
  Backus	
  Naur	
  Form,	
  CACM,	
  
Vol.	
  7,	
  No.	
  12,	
  Dec	
  1964	
  
  Naur,	
  P.	
  (Ed),	
  Report	
  on	
  the	
  Algorithmic	
  Language	
  ALGOL	
  60,	
  
CACM,	
  Vol.	
  3	
  No.	
  5,	
  May	
  1960,	
  p	
  299–314	
  
  Naur,	
  P.	
  (Ed),	
  Revised	
  Report	
  on	
  the	
  Algorithmic	
  Language	
  
ALGOL	
  60,	
  CACM,	
  1962	
  
  Naur,	
  P.,	
  The	
  European	
  side	
  of	
  the	
  last	
  phase	
  of	
  the	
  development	
  
of	
  Algol	
  60,	
  ACM	
  SIGPLAN	
  Notices,	
  Vol.	
  13,	
  No.	
  6,	
  Aug	
  1976	
  
  Nofre,	
  D.,	
  2010,	
  Unravelling	
  Algol:	
  US,	
  Europe,	
  and	
  the	
  creation	
  of	
  
a	
  Programming	
  Language,	
  IEEE	
  Annals	
  of	
  the	
  History	
  of	
  
Computing	
  
  Perlis,	
  A.J.,	
  The	
  American	
  side	
  of	
  the	
  development	
  of	
  Algol,	
  Vol.	
  
13,	
  No.	
  8,	
  Aug	
  1978	
  	
  
 Ceruzzi,	
  P.,	
  2003,	
  A	
  History	
  of	
  Modern	
  Computing,	
  2nd	
  
ed.,	
  MIT	
  Press	
  
 ACM	
  Turing	
  Award	
  Lectures	
  1966–1985,	
  Addison-­‐
Wesley	
  
 MacLennan,	
  1983,	
  B.J.,	
  Principles	
  of	
  Programming	
  
Languages:	
  Evaluation	
  and	
  Implementation,	
  HRW	
  
 Louden,	
  K.C.,	
  1993,	
  Programming	
  Languages:	
  
Principles	
  and	
  Practice,	
  PWS-­‐Kent	
  
 Watson,	
  1975,	
  An	
  Introduction	
  to	
  Algol,	
  Bell	
  
  http://en.wikipedia.org/wiki/Algol	
  
  http://stars.astro.illinois.edu/sow/algol.html	
  
  http://www.constellationsofwords.com/stars/Algol.html	
  
  http://en.wikipedia.org/wiki/ALGOL	
  
  http://en.wikipedia.org/wiki/ALGOL_60	
  
  http://en.wikipedia.org/wiki/META_II	
  
  http://www.citizensky.org/forum/cs-­‐video-­‐and-­‐planetarium-­‐show-­‐wtimothy-­‐
ferris	
  
  http://rosettacode.org/wiki/ALGOL_68_Genie	
  
  http://www.masswerk.at/algol60/algol60-­‐sample.htm	
  
  	
  http://en.wikipedia.org/wiki/Thunk	
  
  http://www.slideworld.com/slideshows.aspx/Algol-­‐and-­‐Haskell-­‐ppt-­‐775501	
  
  Whetstone	
  Algol:	
  http://www.mcjones.org/dustydecks/archives/
2010/05/16/159/	
  

More Related Content

What's hot

ZDD入門-お姉さんを救う方法
ZDD入門-お姉さんを救う方法ZDD入門-お姉さんを救う方法
ZDD入門-お姉さんを救う方法nishio
 
C++20 モジュールの概要 / Introduction to C++ modules (part 1)
C++20 モジュールの概要 / Introduction to C++ modules (part 1)C++20 モジュールの概要 / Introduction to C++ modules (part 1)
C++20 モジュールの概要 / Introduction to C++ modules (part 1)
TetsuroMatsumura
 
アルゴリズムとデータ構造13
アルゴリズムとデータ構造13アルゴリズムとデータ構造13
アルゴリズムとデータ構造13
Kenta Hattori
 
色々なダイクストラ高速化
色々なダイクストラ高速化色々なダイクストラ高速化
色々なダイクストラ高速化
yosupo
 
F#によるFunctional Programming入門
F#によるFunctional Programming入門F#によるFunctional Programming入門
F#によるFunctional Programming入門
bleis tift
 
Scala 初心者が米田の補題を Scala で考えてみた
Scala 初心者が米田の補題を Scala で考えてみたScala 初心者が米田の補題を Scala で考えてみた
Scala 初心者が米田の補題を Scala で考えてみた
Kazuyuki TAKASE
 
CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4
David Wood
 
Starc verilog hdl2013d
Starc verilog hdl2013dStarc verilog hdl2013d
Starc verilog hdl2013d
Kiyoshi Ogawa
 
プログラマのための文書推薦入門
プログラマのための文書推薦入門プログラマのための文書推薦入門
プログラマのための文書推薦入門
y-uti
 
Coq関係計算ライブラリの開発と写像の性質の証明
Coq関係計算ライブラリの開発と写像の性質の証明Coq関係計算ライブラリの開発と写像の性質の証明
Coq関係計算ライブラリの開発と写像の性質の証明
Yoshihiro Mizoguchi
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
fukamachi
 
ウェーブレット木の世界
ウェーブレット木の世界ウェーブレット木の世界
ウェーブレット木の世界
Preferred Networks
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門
masayoshi takahashi
 
yieldとreturnの話
yieldとreturnの話yieldとreturnの話
yieldとreturnの話
bleis tift
 
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例 〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例  〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例  〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例 〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
The Japan DataScientist Society
 
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
Kiyoshi Ogawa
 
第6回 配信講義 計算科学技術特論A(2021)
第6回 配信講義 計算科学技術特論A(2021)第6回 配信講義 計算科学技術特論A(2021)
第6回 配信講義 計算科学技術特論A(2021)
RCCSRENKEI
 
[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展
Deep Learning JP
 
正規表現と正規言語
正規表現と正規言語正規表現と正規言語
正規表現と正規言語
Hideaki Miyake
 
Nagoya.R #12 非線形の相関関係を検出する指標の算出
Nagoya.R #12 非線形の相関関係を検出する指標の算出Nagoya.R #12 非線形の相関関係を検出する指標の算出
Nagoya.R #12 非線形の相関関係を検出する指標の算出
Yusaku Kawaguchi
 

What's hot (20)

ZDD入門-お姉さんを救う方法
ZDD入門-お姉さんを救う方法ZDD入門-お姉さんを救う方法
ZDD入門-お姉さんを救う方法
 
C++20 モジュールの概要 / Introduction to C++ modules (part 1)
C++20 モジュールの概要 / Introduction to C++ modules (part 1)C++20 モジュールの概要 / Introduction to C++ modules (part 1)
C++20 モジュールの概要 / Introduction to C++ modules (part 1)
 
アルゴリズムとデータ構造13
アルゴリズムとデータ構造13アルゴリズムとデータ構造13
アルゴリズムとデータ構造13
 
色々なダイクストラ高速化
色々なダイクストラ高速化色々なダイクストラ高速化
色々なダイクストラ高速化
 
F#によるFunctional Programming入門
F#によるFunctional Programming入門F#によるFunctional Programming入門
F#によるFunctional Programming入門
 
Scala 初心者が米田の補題を Scala で考えてみた
Scala 初心者が米田の補題を Scala で考えてみたScala 初心者が米田の補題を Scala で考えてみた
Scala 初心者が米田の補題を Scala で考えてみた
 
CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4
 
Starc verilog hdl2013d
Starc verilog hdl2013dStarc verilog hdl2013d
Starc verilog hdl2013d
 
プログラマのための文書推薦入門
プログラマのための文書推薦入門プログラマのための文書推薦入門
プログラマのための文書推薦入門
 
Coq関係計算ライブラリの開発と写像の性質の証明
Coq関係計算ライブラリの開発と写像の性質の証明Coq関係計算ライブラリの開発と写像の性質の証明
Coq関係計算ライブラリの開発と写像の性質の証明
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
 
ウェーブレット木の世界
ウェーブレット木の世界ウェーブレット木の世界
ウェーブレット木の世界
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門
 
yieldとreturnの話
yieldとreturnの話yieldとreturnの話
yieldとreturnの話
 
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例 〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例  〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例  〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
データサイエンティスト協会 木曜勉強会 #04 『クラスター分析の基礎と総合通販会社での活用例 〜 ビッグデータ時代にクラスター分析はどう変わるか 〜』
 
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
 
第6回 配信講義 計算科学技術特論A(2021)
第6回 配信講義 計算科学技術特論A(2021)第6回 配信講義 計算科学技術特論A(2021)
第6回 配信講義 計算科学技術特論A(2021)
 
[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展
 
正規表現と正規言語
正規表現と正規言語正規表現と正規言語
正規表現と正規言語
 
Nagoya.R #12 非線形の相関関係を検出する指標の算出
Nagoya.R #12 非線形の相関関係を検出する指標の算出Nagoya.R #12 非線形の相関関係を検出する指標の算出
Nagoya.R #12 非線形の相関関係を検出する指標の算出
 

Similar to Algol60

Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
Verónica Meo Laos
 
Mind Your Language
Mind Your LanguageMind Your Language
Mind Your Language
Kevlin Henney
 
ASSIGNMENT-II(a)
ASSIGNMENT-II(a)ASSIGNMENT-II(a)
ASSIGNMENT-II(a)
sowmiya selvaraj
 
Imperative programming
Imperative programmingImperative programming
Imperative programming
Edward Blurock
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdf
Sohaib Roomi
 
Can programming be liberated from the von neumman style
Can programming be liberated from the von neumman styleCan programming be liberated from the von neumman style
Can programming be liberated from the von neumman style
shady_10
 
Geek Night 16.0 - Evolution of Programming Languages
Geek Night 16.0 - Evolution of Programming LanguagesGeek Night 16.0 - Evolution of Programming Languages
Geek Night 16.0 - Evolution of Programming Languages
GeekNightHyderabad
 
GeekNight: Evolution of Programming Languages
GeekNight: Evolution of Programming LanguagesGeekNight: Evolution of Programming Languages
GeekNight: Evolution of Programming Languages
Hyderabad Scalability Meetup
 
Speaking in Tongues
Speaking in TonguesSpeaking in Tongues
Speaking in Tongues
Kevlin Henney
 
Why-Kotlin definition to understand the use of kotin
Why-Kotlin definition to understand the use of kotinWhy-Kotlin definition to understand the use of kotin
Why-Kotlin definition to understand the use of kotin
sumanneupane23
 
Programming Language Evolution
Programming Language EvolutionProgramming Language Evolution
Programming Language Evolution
Kushan Dananjaya
 
Backus turingaward lecture
Backus turingaward lectureBackus turingaward lecture
Backus turingaward lecture
KulOusemnes
 
Can Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John BackusCan Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John Backus
mustafa sarac
 
ALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleriALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleri
Cumhuriyet Üniversitesi
 
The History Of Call The 60s
The History Of Call The 60sThe History Of Call The 60s
The History Of Call The 60s
Yurithk Jaramillo Vázquez
 
Technology Roundup - Programming Languages & Paradigms
Technology Roundup - Programming Languages & ParadigmsTechnology Roundup - Programming Languages & Paradigms
Technology Roundup - Programming Languages & Paradigms
Ashish Belagali
 
Programming Languages
Programming LanguagesProgramming Languages
22_ideals.ppt
22_ideals.ppt22_ideals.ppt
22_ideals.ppt
DanielPerez457035
 
22_ideals (1).ppt
22_ideals (1).ppt22_ideals (1).ppt
22_ideals (1).ppt
Jadna Almeida
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programming
Rafael Balderosa
 

Similar to Algol60 (20)

Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
 
Mind Your Language
Mind Your LanguageMind Your Language
Mind Your Language
 
ASSIGNMENT-II(a)
ASSIGNMENT-II(a)ASSIGNMENT-II(a)
ASSIGNMENT-II(a)
 
Imperative programming
Imperative programmingImperative programming
Imperative programming
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdf
 
Can programming be liberated from the von neumman style
Can programming be liberated from the von neumman styleCan programming be liberated from the von neumman style
Can programming be liberated from the von neumman style
 
Geek Night 16.0 - Evolution of Programming Languages
Geek Night 16.0 - Evolution of Programming LanguagesGeek Night 16.0 - Evolution of Programming Languages
Geek Night 16.0 - Evolution of Programming Languages
 
GeekNight: Evolution of Programming Languages
GeekNight: Evolution of Programming LanguagesGeekNight: Evolution of Programming Languages
GeekNight: Evolution of Programming Languages
 
Speaking in Tongues
Speaking in TonguesSpeaking in Tongues
Speaking in Tongues
 
Why-Kotlin definition to understand the use of kotin
Why-Kotlin definition to understand the use of kotinWhy-Kotlin definition to understand the use of kotin
Why-Kotlin definition to understand the use of kotin
 
Programming Language Evolution
Programming Language EvolutionProgramming Language Evolution
Programming Language Evolution
 
Backus turingaward lecture
Backus turingaward lectureBackus turingaward lecture
Backus turingaward lecture
 
Can Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John BackusCan Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John Backus
 
ALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleriALGOL ailesi programlama dilleri
ALGOL ailesi programlama dilleri
 
The History Of Call The 60s
The History Of Call The 60sThe History Of Call The 60s
The History Of Call The 60s
 
Technology Roundup - Programming Languages & Paradigms
Technology Roundup - Programming Languages & ParadigmsTechnology Roundup - Programming Languages & Paradigms
Technology Roundup - Programming Languages & Paradigms
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
22_ideals.ppt
22_ideals.ppt22_ideals.ppt
22_ideals.ppt
 
22_ideals (1).ppt
22_ideals (1).ppt22_ideals (1).ppt
22_ideals (1).ppt
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programming
 

Recently uploaded

Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 

Recently uploaded (20)

Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 

Algol60

  • 1. Or,  why  long  dead  programming  languages  matter  
  • 2.   My  motivation?       Developer  with  an  interest  in  PL  design  &  implementation,   paradigms,  and  history.     Interested  in  questions  like:  is  PL  X  suitable  for  task  Y?     Lisp’s  50th  2  years  ago:  Clojure  talk  at  AJUG  in  2008     Before  this  talk  I  hadn’t  written  any  Algol;  lots  of  Pascal     Have  you?       Contribute  anecdotes…       This  is  a  BIG  topic.     The  amount  of  material  available  re:  Algol  is  overwhelming     Have  done  my  best  to  extract  the  key  points  
  • 3.  Algol:  the  Demon  Star    Algol:  the  ALgOrithmic  Language     IAL  &  Algol  60     Motivations     Features  and  contributions     Problems     Implementations  (then  and  now)     The  Children  of  Algol  60     “Algol-­‐like”  languages     Algol  is  Dead:  Long  Live  Algol     The  failure  of  Algol  60     The  legacy  of  Algol  60  
  • 4. •  Algol:  Beta  Persei   •  Arabic  ra's  al-­‐ghūl  from  head   of  the  demon/ogre/ghoul   (Gorgon  Medusa)   •  Also:  Demon  Star  or  Blinking   Demon   •  Distance:  92.8  light  years   •  Orbital  Period:  2.87  days   •  Separation:  0.06  AU   •  Variability  recorded  in  1667;     •  probably  known  much  earlier   Algol  images  x  2  taken  from  this  video:  http://www.citizensky.org/forum/cs-­‐video-­‐and-­‐planetarium-­‐show-­‐wtimothy-­‐ferris  
  • 5. “One  member  of  the  ALGOL  committee  ruefully  noted   that  the  name  ALGOL,    a  contraction  of  Algorithmic   Language,  was  also  the  name  of  a  star  whose  English   translation  was  “the  Ghoul”.  Whatever  the  reason  for   its  ill-­‐fate,  ALGOL  nonetheless  was  influential  on  later   languages.”  (Ceruzzi,  p  95)  
  • 6.
  • 7.
  • 8. “Lisp  and  Algol,  are  built  around  a  kernel  that    seems  as   natural  as  a  branch  of  mathematics.”     (Metamagical  Themas,  Douglas  Hofstadter)   "Here  is  a  language  so  far  ahead  of  its  time  that  it  was  not   only  an  improvement  on  its  predecessors  but  also  on  nearly   all  its  successors.”     (1980  Turing  Award  Lecture,  C.A.R.  Hoare)   “Algol  60  lives  on  in  the  genes  of  Scheme  and  Pascal.”   (SICP,  Abelson  &  Sussman)  
  • 9. begin integer result; integer procedure fact(n); value n; integer n; fact := if n = 0 then 1 else n * fact(n-1); result := fact(5); outinteger (1, result); outstring (1, "n") end A  familiar  style  for  Pascal,  Delphi,  Modula-­‐2  programmers.  
  • 10.   Zuse  published  details  of  an  algorithmic  language  (Plankalkül)  in  1948;  did  not   receive  much  attention  for  decades.     Rutihauser  showed  in-­‐principle  translation  by  computer  of  simple  formulae   and  loop  control  in  1951.     Boehm  published  method  to  translate  algebraic  formulae  in  computer  notation   in  1954.     Similar  attempts  were  made  by  Glennie  (1952,  UK)  and  Liapunov  (1959,  Russia).     Adams  and  Laning  presented  an  algorithmic  language  in  1954;  first  actually   used  (Europe).     IBM  released  Fortran  in  1954.  Previously  in  the  US,  machine-­‐specific  assembly   languages  had  been  in  use.     An  automatic  computing  symposium  was  held  in  1955  in  Darmstadt     translation  of  algorithmic  languages  into  machine  code  was  discussed;     Rutihauser    and  others  stressed  the  need  for  a  universal,  machine-­‐independent   algorithmic  language.     Flow-­‐Matic  (1958):  pre-­‐cursor  of  COBOL;  others  by  Grace  Murray  Hopper     Math-­‐Matic  (1957):  intended  as  improvement  over  Fortran;  “Algol”  contender  
  • 11.
  • 12.   By  mid  1950’s,  need  for  a  universal  machine  independent  PL  was   becoming  apparent.       Key  issue:  portability     Passing  of  time  aggravated  problem:  more  PLs  and  more  programs   written  in  those  languages     GAMM  (a  European  association  for  applied  mathematics  and   mechanics)  created  a  committee  to  look  at  developing  such  a   language.     In  1957,  ACM  and  user  groups  such  as  SHARE  formed  a   committee  to  “…study  and  recommend  action  for  the  creation  of   a  universal  programming  language.”  (MacLennan,  p  99)     In  October  1957,  GAMM  proposed  to  ACM  a  joint  effort.  
  • 13.  It  should  be  as  close  as  possible  to  standard   mathematical  notation  and  be  readable  without  too   much  additional  explanation.     Naur  thinks  Algol  (in  general)  failed  on  this  count.    It  should  be  possible  to  use  it  for  the  description  of   computing  processes  in  publications.     It  set  the  standard  for  at  least  next  30  years.     Naur  thinks  this  is  the  most  frequent  use  of  Algol  60.    It  should  be  mechanically  translatable  into  machine   programs.     BNF  and  syntax-­‐directed  compiler  tools  
  • 14.   IAL:  International  Algebraic  Language     Created  in  Zurich  meeting  over  8  days  by  8  people.     Many  IBM  users  suggested  abandoning  Fortran,  backing  Algol     IBM  decided  against  that  (understandably)     Implementations  for  many  dialects  appeared,  e.g.     JOVIAL  (by  Jule’s  Schwartz)     Jule’s  Own  Version  of  the  International  Algebraic  Language     Still  in  use  by  USAF;  for  military  aircraft  embedded  systems     NELIAC:  Navy  Electronic  Laboratories  International  Algol   Compiler     MAD:  Michigan  Algorithm  Decoder  (IBM,  UNIVAC).       Early  dialects  diminished  value  of  universal  language  committing   users  to  obsolete  versions.      
  • 15. “What  can  be  said  at  all  can  be  said  clearly;  and  what   we  cannot  talk  about  we  must  pass  over  in  silence.”   [Was  sich  überhaupt  sagen  läßt,  läßt  sich  klar  sagen;   und  wovon  man  nicht  reden  kann,  darüber  muß  man   schweigen.]   (Ludwig  Wittgensten,  Tractatus  Logico  Philosophicus,  1921)  
  • 16.   Peter  Naur  (Editor)     Backus,  Bauer,  Green,  Katz,  McCarthy,  Perlis,  Rutihauser,  Samelson,   Vauquois,  Wegstein,  van  Wijngaarden,  Woodger     Formal  syntax  via  Backus-­‐Naur  Form  (BNF)     Informal,  semantics  and  examples  for  each  syntactic  construct     Short:  15  pages!  Common  Lisp:  ~450  pages     In  1970s,  Scheme  paid  tribute  to  Algol  60  with  the  Report  on  the   Algorithmic  Language  Scheme     BNF  and  formal  (operational)  semantics     Started  out  short;  even  in  its  6th  revision,  still  only  90  pages  
  • 17.   1958:  Preliminary  report  on  Algol,  Zürich  meeting     intention  was  to  collect  comments/criticisms  until  final  November  1959   design  meeting;  meant  to  be  an  interim  report     1958:  Informal  meeting  in  Mainz  (40  people)     1959:  Copenhagen  Algol  implementation  meeting     led  to  creation  of    regular  “Algol  Bulletin”  by  Naur     November  1959:  Paris  UNESCO  Algol  conference     Backus  presented  syntax  of  Algol  in  a  formal  notation  he  had   developed;  based  in  part  on  his  work  in  Fortran       November  1959:  ACM  Committee     considered  comments  sent  to  Communications  of  the  ACM     industry  reps,  e.g.  SHARE,  USE  participated       December  1959:  Preparatory  Boston  meeting  for  7  US  delegates     January  1960:  International  Algol  meeting     7  European  representatives  selected  from  Paris     various  language  changes  discussed  (see  Perlis,  1974)       May  1960:  Report  on  the  Algorithmic  Language  Algol  60     1962:  Meeting  in  Rome  to  resolve  remaining  errors  &  ambiguities       1963:  Revised  Report  on  the  Algorithmic  Language  Algol  60    
  • 18.   Focus:  machine  independence  and  portability     Strong,  static  typing  (no  implicits)     integer,  real,  Boolean,  arrays,  string  literals  as  parameters     Block  structure  and  compound  statements     Lexical  (static)  vs  dynamic  scope,  Fortran  COMMON     Free  vs  fixed  format  due  to  input  device  variety:     80  or  90  column  punched  cards;     Teletype;     Punched  paper  tape;     Forced  programmers  to  think  about  code  structure.       By  contrast:  Fortran  constrains  format,  Python  enforces  structure.     Fortran  format  and  I/O  heavily  influenced  by  IBM  704.  
  • 20.  Arrays     Upper  and  lower  limits  can  be  specified     Arbitrary  number  of  dimensions     Arbitrary  subscript  expressions     Bounds  checked  at  run-­‐time    Procedures     Call-­‐by-­‐value  and  Call-­‐by-­‐name     Recursion  (in  Lisp  previously,  not  imperative  PLs)     Implicit  use  of  stacks  for  scopes,  activation  records    Generalised  Fortran’s  control  constructs  (if,  do)    own  keyword  ala  static  variables  in  C    
  • 21.  Backus-­‐Naur  Form  to  describe  syntax    Character  set  independence  via  different   representations     More  on  these  later  
  • 22. begin integer result; integer procedure fact(n); value n; integer n; begin if n = 0 then fact := 1 else fact := n * fact(n-1) end; result := fact(5); print(result) end begin integer result; integer procedure fact(n); value n; integer n; begin if n = 0 then fact := 1 else fact := n * fact(n-1) end; result := fact(5); print(result) end
  • 23. c  Main  program              …   c  common  arrays              real*8  tvec,xvec              common/datapts/tvec(1000000),xvec(1000000)              …              integer  n              …              subroutine  average   c  common  arrays              real*8  tvec,xvec              common/datapts/tvec(1000000),xvec(1000000)              …  
  • 24.  In  dynamic  scoping  the  meanings  of  statements  and   expressions  are  determined  by  the  dynamic  structure   of  the  computations  evolving  in  time.    In  lexical  scoping  the  meanings  of  statements  and   expressions  are  determined  by  the  static  structure  of   the  program.  (MacLennan,  p  119)    Early  versions  of  Lisp  used  dynamic  scoping.    Before  version  5,  Perl  only  had  the  local  keyword   which  denoted  dynamic  scoping.  Perl  5  added  static   scoping  via  my  keyword.    
  • 25. begin real procedure f(x); value x; real x; f := x**2 + 1; real procedure sum(n, m, inc); value n,m,inc; real n,m,inc; begin real s,x; s := 0; for x := n step inc until m do s := s + f(x); sum := s end; print(sum(1, 10, 0.1)) end
  • 26. begin real procedure sum(n, m, inc); value n,m,inc; real n,m,inc; begin real s,x; s := 0; for x := n step inc until m do s := s + f(x); sum := s end; begin real procedure f(x); value x; real x; f := x**2 + 1; print(sum(1, 10, 0.1)) end end
  • 27. begin real procedure helper(x); value x; real x; comment Does something expected for f; helper := x*x; real procedure f(n); value n; real n; f := helper(n) + 1; begin real procedure helper(x); value x; real x; comment Does something else…; helper := x*x*x; print(f(5)) end end dynamic:  126   lexical:  26  
  • 29. begin comment Jensen's device using Algol 60's default Call-by-name parameter passing convention.; integer idx; real procedure sum (i, lo, hi, term); value lo, hi; integer i, lo, hi; real term; comment: term and i are passed by name; begin real temp; temp := 0; for i := lo step 1 until hi do temp := temp + term; sum := temp end; print(sum(idx, 1, 100, 1/idx)) end
  • 30. begin comment Inlined Jensen's Device.; integer lo, hi; integer idx; real sum; begin real temp; lo := 1; hi := 100; temp := 0; for idx := 1 step lo until hi do temp := temp + 1/idx; sum := temp end; print(sum); end
  • 31.   It  is  as  if  the  function’s  formal  parameters  are  bound  to  the   named  entity  ,  e.g.  term  is  bound  to  ‘1/idx’.     The  usual  implementation  is  via  so-­‐called  thunks.     http://en.wikipedia.org/wiki/Thunk   Parameterless,  anonymous,  unseen  function.     “…delays  the  computation  of  a  function's  argument,  and  the   function  forces  the  thunk  to  obtain  the  actual  value.”     Value  returned  is  lvalue  or  rvalue  depending  upon  whether  on   left  or  right  hand  side  of  an  assignment.     Thunks  are  still  used  by  functional  languages  such  as   Haskell  and  Scala  to  implement  code  blocks  whose   invocation  is  to  be  delayed  and  re-­‐evaluated.  
  • 32. begin integer k; integer array A[1:5]; procedure inc2(i, j); integer i, j; begin i := i+1; j := j+1 end; k := 1; A[k] := 2; A[2] := 0; inc2(k, A[k]); print(k, A[k]) end call-­‐by-­‐name:  2    1   call-­‐by-­‐reference:  2    3   begin integer k; integer array A[1:5]; k := 1; A[k] := 2; A[2] := 0; begin k := k+1; A[k] := A[k]+1 end; print(k, A[k]) end
  • 33. begin integer i; integer array a[1:27]; procedure swap(x,y); integer x,y; begin integer temp; temp := x; x := y; y := temp end; a[1] := 27; i := 1; swap(i, a[i]) end begin integer temp; temp := i; i := a[i]; a[i] := temp end;   begin integer temp; temp := 1; i := 27; a[27] := temp end;   Instead  of  (i,  a[1])   being  swapped  from   (1,  27)  to  (27,  1)  we  get:   (27,  27)  since:   i  =  27   a[1]  =  27  (unchanged)   a[27]  =  1  
  • 34.  It  is  not  possible  to  write  a  general  swap  procedure  in   Algol  60.  Call-­‐by-­‐name  (aka  call-­‐by-­‐name)  has  odd   side  effects.  Some  combinations  of  parameters  work.    Algol  68  and  other  languages  since  Algol  60  have   abandoned  call-­‐by-­‐name  in  favour  of  the  now  familiar   (and  less  expensive)  call-­‐by-­‐reference  in  which  the   address  of  the  object  is  passed.    Thunks  still  have  a  role  to  play,  as  mentioned.    
  • 35. “Peter  Naur,  then  the  editor  of  the  Algol  Bulletin,  was   surprised  because  Backus’s  definition  of  Algol-­‐58  did   not  agree  with  his  interpretation  of  the  Algol-­‐58   report.  He  took  this  as  an  indication  that  a  more   precise  method  of  describing  syntax  was  required  and   prepared  some  samples  of  a  variant  of  the  Backus   notation.  As  a  result,  this  notation  was  adopted  for  the   Algol-­‐60  report…”   (MacLennan,  p  101)  
  • 36.   Chomsky  type  0:  recursively  enumerable     Chomsky  type  1:  context-­‐sensitive     Chomsky  type  2:  context-­‐free     Chomsky  type  3:  regular     BNF  corresponds  directly  to  Chomsky  type  2.     Enabled  mathematical  analysis  of  PL  grammar.     Led  to  development  of  automatic  parser  generators     e.g.  META  II  used  for  VALGOL  implementation     later,  extended  BNF     current  tools,  e.g.  yacc,  ANTLR  
  • 37. <for list element> ::= <arithmetic expression> | <arithmetic expression> step <arithmetic expression> until <arithmetic expression> | <arithmetic expression> while <Boolean expression> <for list> ::= <for list element> | <for list> , <for list element> <for clause> ::= for <variable> := <for list> do <for statement> ::= <for clause> <statement> | <label>: <for statement>
  • 38.   Examples  of  for  loop  syntax  based  upon  BNF:   for q:=1 step s until n do A[q]:=B[q] for i := 1 step 1 until 100 do begin x := i * 2; A[i] := x end for k:=1,V12 while V1<N do for days := 31, if leap then 29 else 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 do  
  • 39.   Edsger  Dijkstra  wrote    a  letter  to  the  editor  of  the  March   1968  CACM  that  appeared  as  “GoTo-­‐Statement  Considered   Harmful”:   “For  a  number  of  years  I  have  been  familiar  with  the   observation  that  the  quality  of  programmers  is  a  decreasing   function  of  the  frequency  of  go  to  statements  in  the  programs   they  produce.”  (Ceruzzi,  p  100)     This  resulted  in  a  “goto  controversy”  that  lasted  a  few  years.     Added  to  the  push  towards  Structured  Programming.    
  • 40.  Diminished  need  for  GOTO  in  Algol  vs  Fortran:     Block  structure     Improved  control  constructs    However,  still  present  in  Algol    The  expense  of  GOTO  in  Algol  60     GOTO  statements  can  be  complex,  e.g.     goto if a<b then exit else L[if b<=3 then b else 4];       Popping  of  activation  records  
  • 41. begin integer a, b; switch L := first, second, third, exit; inreal(0, a); inreal(0, b); goto if a<b then exit else L[if b<=3 then b else 4]; first: print("first"); goto exit; second: print("second"); goto exit; third: print("third"); goto exit; exit: end ERK!  
  • 42. a: begin b: begin integer i; for i:=1 step 1 until 100 do begin outinteger(1, i*i); if i*i > 9 then goto exit end end; comment activation records must be popped to get here; worse if goto from within recursive procedure.; exit: outstring(1, "exitedn") end
  • 43.  Now     marst  compiler  (under  GPL):  generates  C     A60  interpreter    In  the  decade  following  the  Algol  60  Report     Elliot  Algol  (Hoare,  Dijkstra)     Burroughs  Algol     VALGOL  via  META-­‐II  compiler-­‐compiler     http://en.wikipedia.org/wiki/ALGOL_60  
  • 44.   Reference  Language     The  working  language  of  the  committee     The  defining  language;  used  in  Algol  60  Report     Character  set  chosen  to  illuminate     Basic  reference  and  guide  for  compiler  builders     Publication  Language     To  be  used  for  communicating  algorithms     Character  set  may  be  richer,  may  vary  by  country     Hardware  Representation     Constrained  by  input  device  and  character  set  of  target  computer     Must  specify  rules  to  map  from  reference  language     See  Algol  60  Report  (Naur  1960)  
  • 45.
  • 46. class Complex(x,y); real x,y; begin real re, im; real procedure RealPart; begin RealPart := re; end; … procedure Add(other); begin re := re + other.RealPart; …
  • 47.  Algol  was  competing  against  Fortran  in  the  scientific   languages  arena.    European  committee  members  more  committed  to   cause  of  single  universal  language  than  US  members   who  were  engaged  in  other  language  projects.  (Perlis,   1974)    Nofre  (2010)  suggests  Algol’s  lack  of  adoption  had   more  to  do  with  diversity  vs  uniformity:       UNCOL  (SHARE  sponsored)  vs  Algol  60  
  • 48.  Lack  of  standard  I/O  or  library  writing  capability     fixed  in  Algol  68  (transput)    Call-­‐by-­‐name  problem     fixed  in  Algol  68  (call-­‐by-­‐ref)    Paucity  of  types,  e.g.  no  complex  type,  strings  as  2nd   class  citizens     fixed  in  Simula,  Algol  68    Baroque  language  features:  for,  switch/goto    No  separate  compilation     Fixed  in  Algol  68  (modules),  Ada  (packages),  OO  langs  
  • 49.   We’ve  talked  about  Algol’s  contributions:     Language  innovations     Influenced  most  subsequent  languages     BNF,  syntax  directed  compiler  design     Algol  60  as  a  publication  language     set  the  standard  for  years     Also  influenced  machine  architecture,  e.g.  dynamic   allocation  of  storage  for  variables  (ICL,  Burroughs).     Many  processors  today  have  machine  instructions  that  cater   for  Algol-­‐style  activation  records.     But,  experience  with  machine  implementation  was  also   leading  this  way.  
  • 50. “Algol’s  is  the  linguistic  form  most  widely  used  in   describing  the  new  exotic  algorithms…Where   important  new  linguistic  inventions  have  occurred,   they  have  been  imbedded  usually  within  an  Algol   framework,  e.g.  records,  classes,  definitions  of  types   and  their  operations,…,modules.  Algol  has  become  so   ingrained  in  our  thinking  about  programming  that  we   almost  automatically  base  investigations  in  abstract   programming  on  an  Algol  representation  to  isolate,   define,  and  explicate  our  ideas…It  was  a  noble  begin   but  never  intended  to  be  a  satisfactory  end.”   (Perlis,  1978)  
  • 51.   Knuth,  D.,  Backus  Normal  Form  vs  Backus  Naur  Form,  CACM,   Vol.  7,  No.  12,  Dec  1964     Naur,  P.  (Ed),  Report  on  the  Algorithmic  Language  ALGOL  60,   CACM,  Vol.  3  No.  5,  May  1960,  p  299–314     Naur,  P.  (Ed),  Revised  Report  on  the  Algorithmic  Language   ALGOL  60,  CACM,  1962     Naur,  P.,  The  European  side  of  the  last  phase  of  the  development   of  Algol  60,  ACM  SIGPLAN  Notices,  Vol.  13,  No.  6,  Aug  1976     Nofre,  D.,  2010,  Unravelling  Algol:  US,  Europe,  and  the  creation  of   a  Programming  Language,  IEEE  Annals  of  the  History  of   Computing     Perlis,  A.J.,  The  American  side  of  the  development  of  Algol,  Vol.   13,  No.  8,  Aug  1978    
  • 52.  Ceruzzi,  P.,  2003,  A  History  of  Modern  Computing,  2nd   ed.,  MIT  Press    ACM  Turing  Award  Lectures  1966–1985,  Addison-­‐ Wesley    MacLennan,  1983,  B.J.,  Principles  of  Programming   Languages:  Evaluation  and  Implementation,  HRW    Louden,  K.C.,  1993,  Programming  Languages:   Principles  and  Practice,  PWS-­‐Kent    Watson,  1975,  An  Introduction  to  Algol,  Bell  
  • 53.   http://en.wikipedia.org/wiki/Algol     http://stars.astro.illinois.edu/sow/algol.html     http://www.constellationsofwords.com/stars/Algol.html     http://en.wikipedia.org/wiki/ALGOL     http://en.wikipedia.org/wiki/ALGOL_60     http://en.wikipedia.org/wiki/META_II     http://www.citizensky.org/forum/cs-­‐video-­‐and-­‐planetarium-­‐show-­‐wtimothy-­‐ ferris     http://rosettacode.org/wiki/ALGOL_68_Genie     http://www.masswerk.at/algol60/algol60-­‐sample.htm      http://en.wikipedia.org/wiki/Thunk     http://www.slideworld.com/slideshows.aspx/Algol-­‐and-­‐Haskell-­‐ppt-­‐775501     Whetstone  Algol:  http://www.mcjones.org/dustydecks/archives/ 2010/05/16/159/