[Types-sig] consensus(?) summary (was: Type annotations)

Paul Prescod paul@prescod.net
Thu, 16 Dec 1999 19:25:40 -0800


Greg Stein wrote:
> 
> >  * non-local writes are checked at runtime (by default)
> 
> Hrm. Is there an easy rule to determine this? 

Yes: if the code's module object is not the module/class whose namespace
we are writing to, the write fails. This is a fast pointer comparison in
CPython.

> I might suggest deferring
> this unless/until we have a clear set of rules. Shades of C++'s "friend"
> modifier are forming in my head when we talk about this...

Simple languages should have simple protection rules.

> >  * for optimization, the checks may be stripped based on type inferenced
> > information
> 
> Which checks? I think runtime checks are *ignored* if you run with -O.
> ...
> In reference to type-inferred information: I don't think runtime checks
> would ever be added if the type has been inferred.

That's what I meant.

> >  * built-in types are declared through "shadow files"
> 
> This is somewhat problematic. How do we map from a builtin type to this
> shadow file? Do they reside in a well-known location?

They reside on the PYTHONPATH.

> Second issue: keeping them in sync, version mismatches, distribution and
> install problems, etc.

Keeping them in sync: coder's responsibility.
Version mismatch: coder's responsibility.
Distribution and install programs: I'll toss this to distutils.

> >  * types can be parameterized
> >  * which means that the compile/runtime checks need to be more
> > sophisticated
> 
> Yes, although I might modify it somewhat and say "only core types can be
> parameterized."

I don't any longer see a reason to restrict it that way. Parameterizing
types is actually not so bad. I don't know how C++'s got so complex as
to be a full programming language 

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Three things never trust in: That's the vendor's final bill
The promises your boss makes, and the customer's good will 
http://www.geezjan.org/humor/computers/threes.html