The opposite of object-oriented programming

4/19/98


Click here to start


Table of Contents

The opposite of object-oriented programming

What is an object?

Why are objects useful?

The trouble with objects

Why is it hard to rerun the model?

A random example

Functional programming

Varieties of functional languages

Getting by without variables

Example in ML

Tail recursion optimization

Tail recursion example

Value bindings

Local bindings

Example of local bindings

Another example of local bindings

Control abstraction

An example of control abstraction

Repeating a computation

An obvious, but bad approach

Implementing the bad approach

What's the problem?

What must we do?

The revised function

Nameless functions

Using lambda expressions

An auxiliary comparison function

Using the function

We have barely scratched the surface

A last example

Remarks

Homework (due Monday)

Author: Andrew Koenig

Email: ark@research.att.com

Home Page: http://www.research.att.com/info/ark