[plt-scheme] Stack Object

From: Paulo Jorge O. C. Matos (pocm at mega.ist.utl.pt)
Date: Tue Oct 15 21:36:46 EDT 2002

>>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.

I'm not really aware with Java, but let me ask this: Why is print-name
not in the interface of the stack example?

> 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.

I'm sorry, I really didn't understand what this had to do with a method
being an interface or not.

Thanks for your patience,

Best regards,


> Matthew

Paulo J. Matos : pocm(_at_)mega.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Software & Computer Engineering - A.I.
  - > http://mega.ist.utl.pt/~pocm
	Yes, God had a deadline...
		So, He wrote it all in Lisp!

Posted on the users mailing list.