1 - maclennan's principles of programming languages
TRANSCRIPT
![Page 1: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/1.jpg)
1 - MacLennan's Principles of Programming Languages
! From the inside front cover of the course text, MacLennan's "Principles of Programming Languages", 3rd edition;
" ...and discussed, illustrated throughout the text;
! some are contradictory, or are at cross-purposes;
! but all are interesting to keep in mind in designing (or evaluating) programming languages
![Page 2: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/2.jpg)
2 - Abstraction! "Avoid requiring something to be stated more
than once; factor out the recurring pattern."
![Page 3: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/3.jpg)
3 - Automation! "Automate mechanical, tedious, or error-
prone activities."
![Page 4: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/4.jpg)
4 - Defense in Depth! "Have a series of defenses so that if an error
is not caught by one, it will probably be caught by another."
![Page 5: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/5.jpg)
5 - Elegance! "Confine your attentions to designs that look
good because they are good."
![Page 6: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/6.jpg)
6 - Impossible Error! "Making errors impossible to commit is
preferable to detecting them after their commission."
![Page 7: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/7.jpg)
7 - Information Hiding" "The language should permit modules
designed so that:
! 1. the user has all of the information needed to use the module correctly, and nothing more; and
! 2. the implementor has all of the information needed to implement the module correctly, and nothing more."
![Page 8: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/8.jpg)
8 - Labeling" "Avoid arbitrary sequences more than a few
items long.
! Do not require the user to know the absolute position of an item in a list.
! Instead, associate a meaningful label with each item and allow the items to occur in any order."
![Page 9: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/9.jpg)
9 - Localized Cost! "Users should pay only for what they use;
avoid distributed costs."
![Page 10: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/10.jpg)
10 - Manifest Interface! "All interfaces should be apparent (manifest)
in the syntax."
![Page 11: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/11.jpg)
11 - Orthogonality! "Independent functions should be controlled
by independent mechanisms."
![Page 12: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/12.jpg)
12 - Portability! "Avoid features or facilities that are
dependent on a particular computer or a small class of computers."
![Page 13: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/13.jpg)
13 - Preservation of Information
! "The language should allow the representation of information that the user might know and that the compiler might need."
![Page 14: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/14.jpg)
14 - Regularity! "Regular rules, without exceptions, are easier
to learn, use, describe, and implement."
![Page 15: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/15.jpg)
15 - Responsible Design! "Do not ask users what they want; find out
what they need."
![Page 16: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/16.jpg)
16 - Security! "No program that violates the definition of
the language, or its own intended structure, should escape detection."
![Page 17: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/17.jpg)
17 - Simplicity" "A language should be as simple as possible.
! There should be a minimum number of concepts, with simple rules for their combination."
![Page 18: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/18.jpg)
18 - Structure! "The static structure of a program should
correspond in a simple way to the dynamic structure of the corresponding computations."
![Page 19: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/19.jpg)
19 - Syntactic Consistency! "Similar things should look similar, different
things different."
![Page 20: 1 - MacLennan's Principles of Programming Languages](https://reader035.vdocument.in/reader035/viewer/2022081622/613d1db4736caf36b7598087/html5/thumbnails/20.jpg)
20 - Zero-One-Infinity! "The only reasonable numbers are zero, one,
and infinity."