Binary Methods Programming: the Clos Perspective
Author(s) -
Didier Verna
Publication year - 2008
Language(s) - English
DOI - 10.5281/zenodo.3248977
Implementing binary methods in traditional object-oriented languages is dicult: numerous problems arise regarding the relationship between types and classes in the context of inheritance, or the need for privileged access to the internal repre- sentation of objects. Most of these problems occur in the context of statically typed languages that lack multi-methods (polymorphism on multiple arguments). The pur- pose of this paper is twofold: rst, we show why some of these problems are either non-issues, or easily solved in Common Lisp. Then, we demonstrate how the Com- mon Lisp Object System (Clos) allows us not only to implement binary methods in a straightforward way, but also to support the concept directly, and even enforce it at dierent levels (usage and implementation).
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom