[plt-scheme] Equivalent of abstract classes?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Dec 5 18:54:55 EST 2009



On Dec 5, 2009, at 6:35 PM, Todd O'Bryan wrote:

> I actually asked myself that question. The method you outline is what
> Python uses, but Python doesn't have interfaces. But then, I'm just
> asking myself what use interfaces really are since Scheme isn't typed.

See HtDC. Types and interfaces are nearly orthogonal. 


> 
> I think I'll just keep trying to do this without worrying about it,
> and see what happens.
> 
> Todd
> 
> On Sat, Dec 5, 2009 at 6:26 PM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>> 
>> (define-syntax-rule
>>  (define/abstract foo)
>>  ;; -->
>>  (define/public (foo . x) (error 'foo "is an abstract method in an abstract class"))
>> 
>> The real question is why one would want one.
>> 
>> 
>> 
>> On Dec 5, 2009, at 6:24 PM, Todd O'Bryan wrote:
>> 
>>> Is there the equivalent of Java's abstract classes  (i.e., interfaces
>>> with some default implementations) in PLT's class system?
>>> 
>>> Todd
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> 
>> 



Posted on the users mailing list.