reflection and OO technology (was: Proposals and Are you serious?)
Jecel Assumpcao Jr
jecel@tunes.org
Wed, 12 Jul 2000 15:12:13 -0300
Lynn,
About your other email, I will just comment that "meta computing" and
"reflection" are terms that have well defined meanings in the computer
science field. Every computation is about something - a payroll program
is about salaries, for example. If a computation is about another
computation, we call it a "meta computation". If a computation is about
itself, then we call it "reflection".
Specifically, reflection implies that the computation has some model of
itself. If the computation changes that model, and that change in turn
changes the original computation, we say that the changes were
"reflected back" from the meta level to the base level.
As long as you accept this, there is no confusion. This is a common
problem with language. For example, there would be no confusion if I
called myself a "hacker" back in 1980. But the media has given that
word a different meaning now, so if I insist on the old meaning I will
certainly cause a lot of confusion. We just have to accept these things
and move on. If I use "hacker" in the new meaning with most people,
they will understand me perfectly. If I use it in the old meaning with
some friends, they will also understand me perfectly. So it
is best if "reflection" in Tunes means what it does in all the computer
science papers and web sites.
> Once you grasp that, particularly of what gets
> incorporated within the single interactive tool,
> you can see what a horrible waste occurred not only
> in the fifth generation project but continued in
> our pursuit of the OO "dream". No one who examines
> this, from the use of a specification language to
> the production of CASE results (analysis and
> design), to construction, finally to testing, using
> logic programming is going to come to any other
> conclusion.
I did come to very different conclusion. I think it is possible to
generate applications from specification for well known problems. I see
no better way to generate the 100th payroll program or 1000th web guest
book. I would also like very detailed specifications for programs that
must run perfectly the first time they are tried in the real world
(landing a probe on Mars, for example).
But there are kinds of programming that are a learning experience. You
can't specify everything in advance because you don't know what you
want until you are halfway done. Smalltalk and Self were designed for
such exploratory programming and do a very good job of it.
In short, I don't believe in universal tools.
> I appreciate your remarks relative to SELF
> performance. I disagree on what should occur once
> you slip under the covers: what occurs in software
> after you process the source input. There is no
> other purpose in a language than its human use by
> human beings. No computer, no software in this
> galaxy cares one whit about communicating with
> humans. That's a human thing. Therefore once you
> get by this shell you ought to let software do what
> it does best. In fact what it only does:
> procedural logic.
Let me explain better, then. Statistical analysis of the Sparc assembly
generated by the Self compilers showed that it is much closer to what C
generates than what C++ can produce. All the "OOness" is eliminated
from the code that the machine has to actually execute.
The 50% overhead is due to safety features that Self shares with non OO
languages like Pascal. And probably PL/1 as well. Don't get me wrong -
I love C and have programmed in it more than all other languages
combined. But it is a tool for certain jobs, and to use it for other
things, like a word processor, is just plain stupid. C is not "the best
possible performance". It is going faster than is possible and has had
a very negative impact on the whole industry. Or do you think that a
program that tells you that 3 billion plus 3 billion is 1705032704 is
acceptable? We are sacrificing 50% of the performance to get programs
that work, and 0% of the performance to write programs in an object
oriented style.
To repeat myself - I don't believe in universal tools.
-- Jecel