[self-interest] prototypes, "meta" and reflective programming

Albertina Lourenci lourenci at lsi.usp.br
Thu Jan 11 19:42:25 UTC 2001


cramakrishnan at acm.org wrote:



> Albertina Lourenci writes:
> >
> > Faré suggests that in the current computing projects necessarily
> > appears a divergence of point of views, as soon as multiple actors
> > (programmers, users) or in presence, and/or as soon as  these
> > actors evolve and that their points of focus change with time
> > (a same person can take several roles in succession even
> > simultaneously). Hence metaprogramming would be useful to
> > enforce consistency between these aspects that else would have to
> > be managed manually; it allows to handle once and for all
> > an uninteresting aspect so as to forget it afterwards.
>
> Hmm... I've been thinking about metaprogramming lately, and though I
> think meta facilities in a language increase the expressiveness of the
> language, I'm coming to the conclusion that having to resort to meta
> facilities is a symptom of lack of expressiveness.
>

I am in agree!!! The problem with me to withstand an in-depth
discussion in computer science is that for a question of  mental
health, I have made up my mind since 1988 (in contrast to my
behaviour before when I became unbearably stressed  accomplishing
very detailed written reports) to focus
in-depth only aspects that are directly connected to the unfolding
of my research. So I erase info that cannot be mapped directly
to my research. Once the info was not registered, I did not
formally concluded anything in written form, now I am having
difficulties to fill the gap.
Since I decided I cannot deal with Beta, although it was the time
I learned most consistently about computer science, I did not
make any report showing my evolution to Self for example.
This is a pity!
I want to focus on some aspect of metaprogramming I learned
in Beta but I am making an association  with something
I read  about virtual machine's capabilities in Self. Moreover
I became aware that a user interface is also a virtual machine.
So if someone could tell me if there is some relationship
between metaprogramming and virtual machine before I try
to explain my viewpoints I would be greatly indebted.
Right now I have to go rowing and swimming to keep healthy
and productive. Worse  at the beginning of February I have
to close temporarily my studies in computer science and
deal with the " discovery" of the free plan in architecture.
I feel people in computer science also do not care about
making a real synthesis.  So it is difficult to sense the
state of the art in computer science.

Cheers
Albertina

>
> For example, one common use of reflection is implemeting proxies in
> Smalltalk/ObjectiveC.  You subclass nil, implement doesNotUnderstand:
> to invoke the method on the wrapped object.  But the fact that you
> have to do this is a symptom of the fact that Smalltalk doesn't have
> the notion of delegation, the way Self does.
>
> Another example is something I just did yesterday in Java.  I received
> a HashMap from an HTTP request that contains the changes a user made
> to an object.  I need to stuff these changes into a persistent object
> so i can get the changes into the Database.  In Java, I had to get a
> PropertyDescriptor and then retrieve the setter method and invoke it,
> etc.
>
> In JavaScript, however, objects are just the same as arrays with the
> slot names being the index.  So I could have just done:
>
>   myObject[key] = value;
>
> No need for reflection.
>
> Another thing i find interesting is that there are some types of meta
> programming which are common (like the two above examples), but others
> which are quite rare (like people creating their own meta-classes).  I
> think this is significant, though I'm not sure what that means. :)
>
> I also remember that in the Self Programmer's Manual there is a
> section that discourages reflective programming.
>
> What do you guys think of this?
>
> - sekhar
>
> --
> C. Ramakrishnan        cramakrishnan at acm.org

--
.----------------------------------------------------------.
| 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                                     |
.----------------------------------------------------------.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20010111/753c44c5/attachment.html>


More information about the Self-interest mailing list