[Types-sig] A lurker's comment

Christian Tismer tismer@appliedbiometrics.com
Thu, 16 Dec 1999 20:25:29 +0100


lannert@lannert.rz.uni-duesseldorf.de wrote:
...
> > It can be helpful, but that doesn't mean it needs to be in a separate
> > file. :)
> 
> Seconded!
> 
> Wouldn't it be a Pythonic solution to regard a restricted namespace as a
> "restricted dictionary" which can (a) refuse to accept new items once
> it is declared closed (or frozen or fixated), and (b) refuse to accept
> values for certain keys unless these values are compatible with a (list
> of) type/class/interface spec(s)? (I guess Chris T. had something similar
> in mind; hadn't you?)

Yes of course. When I can get an effect by adding some sugar to
semantics, and I can avoid any syntactic changes, then I try
since I hate syntax.

>   d = RestrictedDict()

...and so on, easy to implement between supper and X chapters...

What I was missing was the fact that you cannot get out of this is
a static check that your ship will make it to the mars before
you travel. This example from Guido really struck me.
Still I'm not convinced that compile time and run time
are different things, since Python itself is at the moment
the best counterexample.
There must be a third concept between runtime checks and
compiletime syntactic distortion which we are misssing.
Python's simplicity together with cleverness is one of its
most attractive things for me. While I shouted "yeah" when
it came to the type discussion, I quickly recognized that
I don't want it to happen. Something inside me cries veto,
wrong track. But I can't publish this without providing
a better one.

<forgive my concise snip again>

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home