[plt-scheme] image-snip initialization

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Aug 3 19:11:13 EDT 2006

On Aug 3, 2006, at 7:02 PM, David Richards wrote:

> Well it helps a little, thanks.  But using the PLT object system  
> makes me feel like I'm collecting idioms like a philatelist  
> collects stamps.   Shouldn't object systems should be designed not  
> by piling feature on top of feature, but by removing the weaknesses  
> and restrictions that make additional features appear necessary?

I have never heard this claimed about an OO language. It's a phrase  
from the Scheme report.

OOP requires more syntax than FP but in return, gives you a few more  
guarantees. It's a trade off. PLT Scheme's OO system is still less  
notationally heavy than, say, Java.

One could argue that any _good_ language should be designed via  
orthogonal feature composition. Then again, it's almost a recipe for  
not succeeding in the market place. Do you know of a popular language  
that satisfies this principle (not counting ALgol 60)?

-- Matthias

> On Aug 3, 2006, at 6:26 PM, Robby Findler wrote:
>> In order to make the (old style) positional arguments work with the
>> (new style) by name arguments, there are some confusing interactions
>> (and error messages).
>> In this case, you have to propagate the arguments from the  
>> initializer
>> to Image-Snip% to the arguments to image-snip% via super-make-object,
>> which means you need to grab onto and re-send the arguments along.
>> Maybe this example helps?
>> (define Image-Snip%
>>   (class* image-snip% ()
> do i do augments and overrides here?
>>     (init a b c d)
> or here?
>>     (super-make-object a b c d)
>  or here?
>> ))
>> (define Image (make-object Image-Snip% "/Users/dr/test.jpg" 'jpeg  
>> #f #t))
>> I believe that the reason image-snip% hasn't been converted to use  
>> the
>> by-name arguments is the "case-lambda"-like initialization it has
>> already. In particular, the two argument case is completely different
>> from the 4 argument case, and that isn't handled well by `new'.
> I wondered about that.
> http://www.fotosearch.com/comp/CRT/CRT388/15455-50dg.jpg
> - dr_________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.