Interfaces ala Java for Squeak
Blanchard, Tod
tod.blanchard at kanisa.com
Thu Nov 19 17:52:26 UTC 1998
I believe a better/more useful mechanism than interfaces would be something
akin to ObjectiveC's Categories and Protocals.
Take a look.
http://gemma.apple.com/techpubs/rhapsody/System/Documentation/Developer/Yell
owBox/TasksAndConcepts/ObjectiveC/moreobjc.htm#663
> -----Original Message-----
> From: Laurence Rozier [SMTP:lrozier at thepattern.com]
> Sent: Thursday, November 19, 1998 6:00 AM
> To: squeak at cs.uiuc.edu
> Subject: Re: Interfaces ala Java for Squeak
>
> I agree that the benefits you list are desirable, but perhaps should be
> implemented as Roles or better yet, class behaviors associated with a
> prototype. Interfaces exist in part in Java because classes in Java are
> not
> real objects which makes it impossible to provide the capabilities you've
> described. Interfaces can and in my view of the Java world, often do lead
> to
> layers of abstraction and infrastructure which tend to make the executing
> system brittle and difficult to comprehend. It seems to me that Squeak,
> especially from a Morphic perspective, is leading us towards more concrete
> and flexible representations. While there are some valuable lessons to
> learn
> from Java, I think that Squeak should lead rather than follow in the case
> of
> interfaces.
>
> Regards,
> Laurence
>
> GTE/staypufd wrote:
>
> > >What would
> > >they buy us in Squeak?
> >
> > Some of what I thought they'd give us would be:
> >
> > 1) A very trace-able view of how we are using polymorphism.
> > 2) A better understanding of how the system is partitioned.
> > 3) They might also lead to a nice way of verifing that a ST package
> that
> > you are loading supports a complete interface. (We would need to
> > implement something like SSL's in VW)
> > 4) They are also kinda like a typing mechanism. Not for individual
> > variables, but for groups of functions. Like the object is declaring I
> > am one of these things that can do 'X". Where 'X' is the interface.
> > 5) They are kind of like a 'contract' in the way I was thinging of
> > implementing them. Because when you declared it in the class defintion,
> > and then accepted it, the methods in that interface would then be
> > auto-generated for you. Thus you would fullfill the 'Contract'.
> >
> > and finally, the one that Java really uses them for:
> > 6) In addition to allowing multiple inheritence of interface.
> >
> > Any more thoughts?
> >
> > Sam Griffith Jr.
> > staypufed at aol.com
More information about the Squeak-dev
mailing list
|