[Types-sig] Re: [Doc-SIG] Sorry!

Edward Welbourne Edward Welbourne <eddyw@lsl.co.uk>
Wed, 15 Dec 1999 20:26:25 +0000


Damn.  Another message arrived before I could escape ;^/
Paul said (we'd gone off line due to another of my confusions):

> Greg admits that his proposal does nothing about attributes.
Thus far I've only seen him saying he doesn't consider them worth attention.

> a whole interface definition mechanism. Which brings us back to the
> idea of interfaces separate from implementations, which brings us back
> to shadow files, even for Python code.
whoa.  I don't follow the inferences here.

The only interface definition mechanism I can see needed is the one that
lets us specify the analogue of C structures and function types - that
is, the equivalent of a typedef.  One interface thus defined can be
deployed for several objects that support it - this does not mean that
we have to have a separate *file* in which to say it, let alone a
separate file in which to re-iterate the specification of the interface
for each of the files which defines an export which matches that
interface.

The !-assertion mechanism will, indeed, depend (when taken to its
logical extreme) on some way of saying `an object which has attribute
foo, which is an integer and which *you* cannot modify though the object
might', mutatis mutandis.  For that we'll need an IDL, in some guise,
which can produce an object which encodes that spec.  Such an object can
be used in many places.  While that object gets constructed someplace
else than the objects it gets used to describe, it needn't be in a
separate file; nor need this place know anything about the objects that
will be described by the interface description object, least of all
their names.

As long as we can construct objects which encode interface descriptions,
we can

 * use !-assertions on values in-line, where those values are computed,

 * use those interface objects when filtering using a setattr hack

 * provide some mechanism for an object to `publish' the fact that it
   supports some given interface (as I understand it, someone's done this).

and if we can't define such objects then there is no amount of fun and
games with shadow files can possibly help us.

(If I keep this up much longer, I shalln't have time to write about my
object-unification schemes in time for IPC8 ... which I care about much
more than type-checking, and which may simplify all this anyway.)

Dinner time,

	Eddy.