[Types-sig] PyDL RFC 0.02

Greg Stein gstein@lyra.org
Tue, 28 Dec 1999 18:19:26 -0800 (PST)

On Mon, 27 Dec 1999, scott wrote:
> On Mon, Dec 27, 1999 at 12:14:41PM -0800, Greg Stein wrote:
> > Note: the compile-time checking *does* need to know everything that
> > happens in the run-time namespaces. It must check the assignments and
> > usage of values in the namespaces.
> I don't see how compile-time checking can know much of anything about
> runtime-specific namespaces without running code.

It doesn't have to run code.

Try out the prototype that I posted to this list a few days ago. It can
tell you a lot about what, when, and where values are stored into the
different namespaces. And it doesn't run code -- it just walks the parse

> If it runs code, it
> is no longer compile-time checking. Furthermore, if the compile-time
> checker assumes that the running of code can do anything it can today,
> there's not much of anything that can be checked at compile time to
> begin with.

You'd be surprised at what it can check :-)

The checker can easily track type usage and find things that should not be
allowed. The check.py (and friends) that I posted only does a couple
things, but the framework is there for more. I just need to start filling
stuff in. I went for breadth-first so that people could see what a type
checker would look like.

> This is why it seems to me that checks done at compile-time must be
> done based on a compile-time specific model of the namespaces, and
> that model must be more restrictive in naming and scoping usage than
> python currently is.

Nope. I posted an "existence proof" that I believe contradicts this :-)


Greg Stein, http://www.lyra.org/