<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Jecel Assumpcao Jr wrote:
<blockquote TYPE=CITE>On Fri, 24 Nov 2000, Albertina Lourenci wrote:
<br>> In Gúnther Kniesel's Ph.. thesis, page 165  he states:
<br>> These are no problems of the deisgn patterns themselves, but of the
<br>> underlying object model, which provides no suitable means to
<br>> implement the patterns.
<p>Which means your subject line is rather strange since he is trying to
<br>show that delegation helps design patterns.
<br> </blockquote>

<p><br>I would rather say it is strange the way you are quoting things!
<p>Günther stated  on page 166
<br>However the granularity of language support for design patterns is
subject
<br>to debate. Whereas some authors insist that every pattern needs its
<br>specific language support, other point out that this would be overwhelming
<br>and argue that the common needs of many different patterns
<br>should be identified and supported by generic mechanisms.
<br>Günther thinks that delegation is such a generic mechanism.
<br>However he shows in chapter 3, pages 40-48 that simulation of
<br>delegation in traditional typed-languages leads to a dead end!
<br>So he concludes on page 50 " the most promising approach to
<br>unanticipated behaviour evolution is the integration of delegation
<br>into statically typed class-based models. This is the approach
<br>he pursues and designs Lava, an extension of delegation to Java.
<blockquote TYPE=CITE> 
<br>> He says to look at the book of the GOF
<br>> page 309 where he states dynamic inheritance would be a desirable
<br>> implementation for the state pattern. This was found in an earlier
<br>> version of Self!
<p>Self 4.1.2 does have dynamic inheritance. It is just that it doesn't
<br>perform as well as static inheritance. I have proposed an
<br>implementation trick to get good performance in the common case (using
<br>multiple "map objects" for a single "clone family").</blockquote>
What I meant here reiterates what  I quoted above. Anyhow thanks for
the
<br>info.
<blockquote TYPE=CITE> 
<p>> The granularity of language support for design patterns is subject
to debate.
<br>> Some authors insist that every pattern needs its specific language
support,
<br>> others point out that this would be overwhelming and argue that the
common
<br>> needs of many different patterns should be identificied and
<br>> supported by generic mechanisms.
<p>  "Perfection is achieved, not when there is nothing left to add,
but
<br>   when there is nothing left to take away."
<br>     Antoine de Saint-Exupéry (1900-1944)
<br> </blockquote>

<p><br>Well Platonic perfection sounds like eternal beauty, static, not
evolving.
<br>For example Christopher Alexander  mimicks Platonic thinking perfectly
<br>well. Saint Exupéry's quotation sounds Platonic anyhow.Reading
<br>The small prince I would never forget what he stated about love:
<br>one is responsible for whom  one captivates!  What makes
you think
<br>that to love is to try to captivate someone!  Something like I
tried
<br>persuading Günther to share our discussion!!!
<br>And you saw his reaction! Well modern thinking refuses this trend
<br>of thinking. Apples and bananas will never mix ...apples are from
<br>temperate zone and bananas from tropical climates! So it is better
<br> to evolve vertically being open and trying to understand the
way
<br>things are and at a higher level one understands that banana and
<br>apple are fruit. In this level the understanding is possible. And the
<br>fact one is tropical and the other is temperate may seem irrelevant.
<br>And yet it is a mere possibility...
<p>I'm rather a scientifc mind like Aristotle!  Or like the theorists
that bet
<br>on evolutionary ideas.  So I think that necessarily things are
always
<br>evolving....This process leads us to find states that Platonic thinking
<br>describes as perfect, however a man who bets on experience will
<br>always feel that there are still more infinitely perfect things to
come....
<br> 
<p>I think most people interested in "the Power of Simplicity" would agree
<br>with that one. Of course, using a single, powerful, mechanism for
<br>everything can make it hard to express intentions. For example, using
<br>"goto" instead of "if then else", "while", "for", "case", "loop" and
so
<br>on is not a good idea.
<p>However using the concept of object, and forgetting about variables
<br>and instances  mimicks the perfection of the notion of thing.
Simple
<br>and convincing!
<blockquote TYPE=CITE> 
<br>> I was afraid of Lisp because it is atyped. Besides the fact it
<br>> doesn't feet my needs.
<br> </blockquote>
Sorry for the English errors....untyped and fit my needs...
<br>This is a common misconception. There are many kinds of types and just
<blockquote TYPE=CITE>because LISP is different from Pascal does not make
it an untyped
<br>language. The difference is where (and, as a consequence, when) the
type
<br>information is defined:
<p>  Pascal
<br>      - static types
<br>      - each container (variable) is associated
with a type at compile
<br>         time
<p>  LISP
<br>      - dynamic types
<br>      - each object (value) is associated
with a type at run time
<p>There are untyped languages (Forth, B, machine language) but they are
<br>very different from dynamically typed ones (LISP, Smalltalk, Self,
<br>APL).
<br> </blockquote>
Yes, I realized this only in 1996!  But underlying my viewpoint was
<br>the need to be democratic. I mean I wanted every architect to design
<br>with my ecodesign model. And so according to the experts in computer
<br>science (among them my beloved Stephen Omohundro who also deals
<br>with geometric learning algorithms!)  one should for economic
reasons respect the
<br>environment created for C!!! And hence program in PCs!!!
<blockquote TYPE=CITE> 
<br>> Then in 1996 I read a paper written by Ole Agesen and
<br>> published at ECOOP'95 where I realized that only in appearance Self
is
<br>> not typed for the user. The types are all included in the compiler.
<br>> Sorry I do not have the paper with me here.
<br>>
<br>> So can you explain to me how this story works?
<p>His work is a very interesting application that run on top of Self -
<br>you seem to have the impression that it is part of the implementation
<br>of the language but it isn't.</blockquote>
It could have been...But what matters is that I suddenly was not
<br>afraid of exploratory programming and I was forced to see how
<br>Self worked ....If I didn't  I was not faithful to scientific
truth!
<blockquote TYPE=CITE> 
<p>In Dave's talk at ECOOP'95 he defined two kinds of types:
<p>   - abstract type = the set of objects which understand a
given set of
<br>                               
messages. helps the programmer find
<br>                               
errors in the code
<p>   - concrete type = the set of objects that have the same
memory
<br>                                
structure and method implementations.
<br>                                
helps the compiler generate efficient
<br>                                
machine language code
<p>The Self programmer doesn't declare types, but the compilers create
<br>their own notion of concrete types for objects (using "map" objects)
in
<br>order to save memory and enhance performance.
<p>Ole's program can look at a group of Self objects and automatically
<br>separate them into sets representing abstract types.
<p>Most languages mix these two kinds of types together into a single idea
<br>and cause a lot of confusion (see C++, for example). Combined with
the
<br>static/dynamic kinds of types, we can see the following in Java:
<p>  static abstract type = the interface of a variable
<br>  static concrete type = the class of a variable
<br>  dynamic concrete type = the class of an object stored in the
variable
<br>                                       
(must be a subclass of the
<br>                                       
concrete abstract type or a
<br>                                       
class which implements the
<br>                                       
static abstract type for that
<br>                                       
variable)
<br> </blockquote>
Wonderful explanation!!I love it!
<blockquote TYPE=CITE> 
<br>> Then I fell in love with Self  and abandoned programming in
Beta.
<p>Perhaps you should reconsider this since Günther is wrong about
his
<br>language being the first static one to implement delegation. It seems
<br>to me that Beta's "part-object inheritance" is exactly that.
<br> </blockquote>
Honestly I do not agree! Anyhow I should consult my friend Erik Ernst.
<br>I am sure he  may help us to  get to a consensus.  I
think the abstract
<br>mechanism introduced by Bent Bruun Kristensen  (he is the creator
<br>of the abstract mechanism in Beta like the pattern and so on...)
<br>complex associations would be nearer. If I remember well,  he
published
<br>this paper in OOPSLA'95!!
<blockquote TYPE=CITE> 
<br>> [page 39, page 40-48]
<br>> Honestly this kind of analysis I cannot even read.
<br>> What's wrong here? I do not know because I am able
<br>> to follow detailed papers like those written by
<br>> Luca Cardelli or the above written by Ole Agesen.
<p>Maybe you have not understood all these papers as well as you think
you
<br>have....
<br> </blockquote>

<p><br>By now I managed to read pages 40-48. See what happened. I have
to
<br>read very slowly detailed information to grasp its meaning. For me
this
<br>is awfully painful and violates the needs of the cognitive processes
<br>linked to the right side of the brain. Especially when there are leaps
<br>in the analytical thinking. Luca Cardelli fills everything like a continuum..
<br>When I grasp the idea, I manage to read things at very fast
<br>speed. If I read slowly my memory is not good, and so at the
<br>end of a long paragraph I do not remember what I read!!!
<p>See until 22 years old, I read too much...After that I only managed
<br>to read Ulysses from James Joyce at the age of 33....Simply
<br>because it is like music...What matters is what you read at the
<br>moment...You do not have to remember anything...
<blockquote TYPE=CITE> 
<br>> In page 50 he concludes stating that the most promising
<br>> approach to unanticipated behaviour evolution is the
<br>> integration of delegation into statically typed class-based
<br>> models.
<br>>
<br>> Can someone explain to me in a way that  enables
<br>> a right-sided thinker to understand this?
<p>He just said that prototype based language can easily implement the
<br>various design patterns directly (with object modification, which he
<br>thinks is bad, and with delegation, which he thinks is good), while
the
<br>class based ones have to use complicated simulations of delegation
<br>which make everything much harder to understand. And if you add static
<br>types things get even worse since then the simulation doesn't even
work
<br>anymore!
<p>So his conclusion is that we should fix the statically typed class
<br>based languages by adding delegation to them and getting rid of the
<br>simulation.</blockquote>

<p><br>Yes, by now I understand this. What I think makes things
<br>difficult to read in his thesis is the diagrams...They are too
<br>sequential to represent things that are rather hermeneutic and
<br>hence circular....
<blockquote TYPE=CITE>My conclusion is that I will keep using a prototype
based
<br>language :-)
<br>Well intuitive I stick to the prototype based languages...</blockquote>
But how can I persuade a researcher at FAPESP (FOundation
<br>of Protection To Research in Sao Paulo State) that may even
<br>not know what object orientation is, that it is worth to
<br>invest in prototype based languages....
<p>I have not concluded my  inquiries yet because nobody from
<br>the prototype based community showed how design patterns
<br>are better implemented in Self for example....
<p>Dave, do you hear? The challenge is launched!!!
<br> 
<p>Now I am eager to read chapter 8 from Günther's thesis.  I
invite
<br>you all to do the same. It is really intriguing He illustrates how
<br>to use delegation to implement some design patterns.
<p>Thanks Jecel and Happy Birthday to you!!!!Happy Birthday to
<br>you!!! And that God may bless you and you may accomplish
<br>all your desires! and have a very long life to see life on Mother
<br>Earth become sustainable  through the breakthrough of
<br>prototype based languages!!!!
<p>Albertina
<blockquote TYPE=CITE> 
<br>-- Jecel</blockquote>

<pre>-- 
.----------------------------------------------------------.
| Albertina Lourenci                                       |
| PhD  in Architecture and Urbanism                        |
| post-doctorate researcher                                |
| Laboratory of Integrated Systems University of Sao Paulo |
| Avenida Professor Luciano Gualberto, 158 Travessa 3      |
| CEP: 05508-900                                           |
| Sao Paulo Sao Paulo State Brazil                         |
| Voice: +55 011 818 5254                                  |
| Fax: +55 11 211 4574                                     |
.----------------------------------------------------------.</pre>
 </html>