[Types-sig] Re: syntax (was: check.py)

Paul Prescod paul@prescod.net
Fri, 31 Dec 1999 04:38:47 -0500


Greg Stein wrote:
> 
> ...
>
> > And I put decl
> > and typedecl at the front instead of making them operators because I
> > agree with Tim Peters that we are designing a sub-language that needs to
> > be understood as being separate by virtue of being evaluated BEFORE the
> > code is executed.
> 
> I disagree. Making a "sub-language" will simply serve to create something
> that is not integrated with Python. I see no reason to separate anything
> that is happening here -- that is a poor requirement/direction to take.

Compile time stuff is inherently separate because it is *compile time
stuff*. It follows different import rules, it is evaluated in a
different namespace, and so forth. This, for instance, is not legal:

a = doSomething()
b = typedef a

Python programmers need to understand these sorts of things. The decl
syntax and "gpydl" semantics makes it very clear that these declarations
are *separate* and are evaluated in a different time in a different
execution context with a different namespace.
 
> The typedef unary operator allows a Python programmer to manipulate type
> declarator objects. That will be important for things such as an IDE, a
> debugger, or some more sophisticated analysis tools.

This is a completely orthogonal issue. There is no syntax in Python for
a traceback or frame object but IDEs can work with traceback and frame
objects. Classes are not created by a unary operator and assignment but
they are still runtime-available objects.

 Paul Prescod