Lecture overview -- Keyboard shortcut: 'u'  Previous page: Functions and closures revisited -- Keyboard shortcut: 'p'  Next page: A general pattern of classes -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Simulation of other Paradigms and Continuations - slide 3 : 43

Classes and objects

Due to (1) the first class status of functions, and due to (2) the use of static binding of free names, it is possible to interpret a closure as an object

With this interpretation, it is possible to regard certain function definitions as classes

The definition of a 'class Point ' with methods getx , gety , add , and type-of.
The send method which is used in the Point class.
Go to exercise
Points and Rectangle