[Types-sig] Issue: definition of "type"

Tim Peters tim_one@email.msn.com
Mon, 20 Dec 1999 01:50:31 -0500


[PaulP]
> For instance, these things are not types:
>
> if somefunc():
> 	class spam:
> 		foo: String
> else:
> 	class spam:
> 		foo: int
>
> spam is a class but not a static type.

True, but it can be given a static type *name*; e.g.,

    decl type spam

Provided that the attributes of spam actually referenced outside of spam
have the same signatures, static type checking outside of spam shouldn't
care that it doesn't know about spam's internals.  Or, IOW, if the two
dynamic versions of spam present the same external interface to the
compiler, it doesn't matter how the *class* spam comes into being at
runtime.

> Jim Fulton also defines some ways to make interfaces at runtime. Those
> are also not "static types" for our purposes. An interface constructed
> at the top level would be a valid static type.

As above, shouldn't matter.

what-isn't-built-until-runtime-can-yet-be-declared-at-
    compile-time-ly y'rs  - tim