In section 11 of the Tutorial you talk about displaying a tree structure for deeply nested sub-traits. Since traits can be "flattened" conceptually, couldn't you avoid the tree structure?
Well, it is true that traits can always be flattened and therefore you don't need such a tree view in order to understand the code. However, sometimes it is very useful to look at the code in a "compositional view"
Let's say you are browsing the class ColoredCircle. By default, the browser shows it in a flat way and you don't need to worry whether it is built by using traits at all. However, the browser should indicate, that this class is actually built from traits and it should allow you to see more details by clicking on something like the (+) icon of the tree widget. Then, you can see all the traits (e.g., TCircle, TColor) the class uses. In order to be consistent, the browser should now also indicate, that the trait TCircle is built as a composition of multiple traits. Then, the user can, if he wants, again click on the (+) icon of the widget and see the details (i.e., traits TMagnitude and TGeometry). Etc.
The current browser only shows one nesting level. This means that for the class ColoredCircle, you see the traits TCircle and TColor. If you want to see more, you need to go to the definition of these subtraits.
This means that there is a "compositional view", but its depth is limited to 2. I think it should be unlimited...
Nathanael
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Doug Mair Sent: Dienstag, 4. Februar 2003 19:04 To: The general-purpose Squeak developers list Subject: Re: Traits prototype image
Very impressive work.
In section 11 of the Tutorial you talk about displaying a tree structure for deeply nested sub-traits. Since traits can be "flattened" conceptually, couldn't you avoid the tree structure?
----- Original Message ----- From: "Nathanael Schärli" n.schaerli@gmx.net To: squeak-dev@lists.squeakfoundation.org Sent: Tuesday, February 04, 2003 8:37 AM Subject: Traits prototype image
Hi
I finally released a first version of our trait prototype
image. More
information can be found at:
~schaerli/smalltalk/traits/traitsPrototype.htm
There, you can also read more about our future plans and
why there is
no changeset available yet.
Cheers, Nathanael