meta-level code organization (RE: [Q] mixin pattern - how to use an alternate Behavior for Class)

Nathanael Scharli n.schaerli at gmx.net
Thu Jan 31 10:29:15 UTC 2002


> What is your feeling for the ease of manipulating a shared prototype
> environment like Self.  I don't have any experience with it.  In
> trying to get my Mixin class to show up in the Browser, along with knowing
that
> delegation would solve this mixin problem as well, I keep wondering how a
> delegative model would be browsed and searched and displayed.   I also
> wonder how we could mix the two models, yet have a consistent browsing
> experience.  Does Self even have a 'class' browser?

Hi Rob,

Your thoughts are very interesting, especially what you said about
delegation. When I wrote a little bit about my work on mixins, I didn't
mention delegation, but in fact, I am working on a flexible but -simple-
model that supports both mixins and delegation in a consistent way.
Simplicity is really the my main goal and I believe that one of the reasons
that multiple inheritance and mixins are not very well supported by current
languages is the fact that it can make the code too complicated, and as a
consequence, a programmer has a hard time to understand what is actually
going on.

I really think that a good UI (a good browser) is one of the key issues to
achieve a clear and simple mixin (and delegation) model. The UI of a
programming language (in ST, the browser) is the way a programmer looks at
(and edits) the code. Thus, it is the responsibility of the browser to do
that in a way that supports the programmer in writing and understanding a
program. If the semantic model of a programming language gets richer (e.g.
if there is a model for mixins/delegation), it is important that also the UI
gets richer and supports the programmer in using and understanding these new
features.

The last days, I have been working on a browser extension for supporting my
model of mixins/delegation and although it is not running yet, it looks
pretty promising. Nevertheless, I think that this is only one step into the
right direction. In the long-term the UI of such a programming language
should allow the user to switch freely between different views of the same
program. This means that a program should be represented in a way that
allows generating these different views and also allows the prorammer to
inspect and manipulate the characteristics of the program that are
represented in these individual views.

Cheers,
Nathanael




More information about the Squeak-dev mailing list