[plt-scheme] Stack Object
At Wed, 16 Oct 2002 00:29:54 +0100, "Paulo Jorge O. C. Matos" wrote:
> What's the utility of an interface?
To support `is-a?' and `implements?' tests that are not necessarily
tied to implementation inheritance. They're intended to serve the same
role as Java interfaces, but in dynamic, first-class form.
In particular, being an instance of stack<%> doesn't prevent an object
from being used more specifically as a named-stack%, just as the #t
result of `(integer? 4)' doesn't prevent 4 from being used more
specifically as an integer.
Matthew