[self-interest] On "Meta," with a trick question at the end.

Jecel Assumpcao Jr jecel at merlintec.com
Wed Jan 17 19:24:42 UTC 2001

Albertina wrote:
> David Ungar wrote:
> > Then there was a bunch of other stuff that needed to be there for the
> > programming environment,
> > that took an object's destiny away from it. That seemed like the meta
> > stuff and went into the mirrors.
> So the only concern of Self with metaprogramming sounds like this.

True, but "only" makes the ability to create the programming
environment in the language itself (note that this is not the same
thing as writing a C programming environement in C, as I explain
below) a trivial thing. In theory, it is a trivial detail. In practice,
this is the reason why the programming tools in C++ or Java can't
compare with what Self and Smalltalk have.

> This makes reflection the same as metaprogramming right?

Reflection is a subset of metaprogramming:

    a meta-program is about some program
    a reflective program is about itself (which is a program, of course)

Like Randy pointed out, "meta" is subjective and so reflection is too.
One definition is that with reflection the program can not only "look"
at itself but also change itself (we say it reflects changes to the
meta layer back to the base layer).

The name "mirror" for the special objects in Self was certainly
intended to indicate reflection. And that is what I was talking about
before - a C programming environment written in C is certainly
meta-programming, but it is not reflective.

> What about Self/R?  How will be reflection decisively made
> explicit here?

Self 4 has many meta-objects, but these are written in C++ and totally
hidden from Self programmers. There is a good reason for this - these
things are only interesting to the language implementors and not to
"normal" programmers. These objects will be written in Self for Self/R
and will be available at the Self level though a special "_meta"
interface, but the idea is that the language implementors can enjoy the
wonderful programming environment that Self offers (instead of dealing
with vi and gdb) and not that normal programmers should start to mess
with these things.

This is a very important point that I have mentioned before. Reflection
is powerful, but so is dynamite. You should use something else except
in the cases where there are no alternatives.

> > At 4:23 PM -0800 1/16/01, Randy Smith wrote:
> > >Hey, how about the metaness of the following, which refers to
> > >itself and is therefore meta?  "If this sentence is true, it is
> > >not meta, otherwise it is meta."
> > >
> > >Is it an empty trick or does it reveal a problem with the
> > >meta/nonmeta distinction?

You mixed two different complications. The truth value of the sentence
can't be determined due to the "strange loop" Albertina mentioned which
makes it a paradox.

But the words "this sentence" make the metaness of the sentence easy to
determine - it is meta. But here we have a second loop (totally
unrelated to the first), which can be more easily seen in this simpler
(true) sentence:

                   This sentence is meta.

"Meta" is a relative term, so this sentence is meta to what? To itself,
strangely enough! That means it is also a meta-meta sentence, also
relative to itself. And a meta-meta-meta sentence, and so on.

                   "A well-known scientist (some say it was Bertrand
                   Russell) once gave a public lecture on astronomy. He
                   described how the earth orbits around the sun and how
                   the sun, in turn, orbits around the center of a vast 
                   collection of stars called our galaxy. At the end
                   of the lecture, a little old lady at the back of the
                   room got up and said: "What you have told us is
                   rubbish. The world is really a flat plate supported
                   on the back of a giant tortoise."

                  The scientist gave a superior smile before replying,
                  "What is the tortoise standing on?"

                  "You're very clever, young man, very clever," said
                  the old lady.

                  "But it's turtles all the way down."

                  Stephen Hawking, in "A Brief History Of Time"

I remember the story slightly differently (this version seems to skip a
few levels), but it doesn't matter. Whenever we make meta explicit in a
computer system, we are dividing it into two levels. But we don't want
the lower (meta) level to feel different from the other, so we are
tempted to add a third (meta-meta) level. Why stop at 3? We soon want
inifinite levels, though of course we have no practical use for them.

By using Randy's self reference loop trick, we can get the effect of an
infinite number of levels with just one (though they have to be all
exactly alike). Smalltalk-80 showed just how twisted this could get:


Of course, avoiding this kind of thing was one of the motivations for
the creation of Self, right?

-- Jecel

More information about the Self-interest mailing list