Pages

Sunday, May 2, 2010

Elements of Programming, Notes

Here I'll post notes from Elements of Programming (Alexander Stepanov, Paul McJones) that are interesting and insightful, IMO. That takes (will take) a lot of time because I do it in my free time.

here we go,
  • As with other areas of science and engineering, the appropriate foundation of programming is the deductive method. (pg ix)
  • Discovering the architectural principles of the book should be the reader's goal. (pg ix)
  • Starting with a brief taxonomy of ideas, we introduce notions of value, object, type, procedure, and concept that represent different categories of ideas in the computer. (pg 1)
  • A central notion of the book, regularity, is introduced and elaborated. When applied to procedures, regularity means that procedures return equal results for equal arguments. When applied to types, regularity means that types possess the equality operator and equality-preserving copy construction and assignment. (pg 1)
  • Categories of Ideas: Entity, Species, Genus.
  • An abstract entity is an individual thing that is eternal and unchangeable, while a concrete entity is an individual thing that comes into and out of existence in space and time. (pg 1)
  • A function is a rule that associates one or more abstract entities, called arguments, from corresponding species with an abstract entity, called the result, from another species. (pg 2)
  • A datum corresponding to a particular entity is called a representation of the entity; the entity is called the interpretation of the datum. We refer to a datum together with its interpretation as a value. (pg 2)
  • A datum is well formed with respect to a value type if and only if that datum represents an abstract entity. (pg 2)
  • An object is a representation of a concrete entity as a value in memory. An object has a state that is a value of some value type. (pg 4)
  • Values and objects play complementary roles. Values are unchanging and are independent of any particular implementation in the computer. Objects are changeable and have computer-specific implementations. (pg 4)
  • Functional programming deals with values; imperative programming deals with objects. (pg 5)

No comments:

Post a Comment