Motivation: Objekt =
Einfachste Implementierung:
Anwendung: Datei-Objekte in UNIX (seit 1970)
(Merksatz 1: all the world is a file) (Merksatz 2:
those who do not know UNIX are doomed
to re-invent it, poorly)
typedef struct {
int x; int y; // Daten
void (*print) (FILE *fp); // Verhalten
} point;
point *p; ... ; (*(p->print))(stdout);
Johannes Waldmann
2014-03-31