[Types-sig] New syntax?

Paul Prescod paul@prescod.net
Thu, 16 Dec 1999 11:45:55 -0800


There are two separate issues here. Separate files and separate
syntaxes. And there are two different time periods here: today and in
Python 2.

Separate files are a necessity to handle C-coded types. Ergo anything on
top of that is more work and given that we are still talking about
something useful in a month (though that is looking less and less
likely) I am not inclined to take on the extra work of new operators and
an inline syntax.

As far as separate syntaxes go, we are designing a new syntax
regardless. There is no way to define the type of "map" in Python today.
The question is whether the new syntax is built by overloading the
meaning of Python basic types or whether it is just new and different. I
mean we could outlaw new syntaxes in Python:

from re import *

compile( union( repeat( character_class( ["abc"] ), 
	optional( negate( character_class ( ["def"]) ) )

That makes no sense to me.

If you or someone proposes a completely Pythonic syntax that can handle
type unions, parameterized types, lists and tuples gracefully then we
can compare some declaration examples to a designed-from-scratch syntax
and let Guido decide.

-- 
 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