Dr. Dobb's Python-URL! - weekly Python news and links (Nov 3)

John Roth newsgroups at jhrothjr.com
Mon Nov 3 20:28:03 CET 2003


"Dave Benjamin" <ramen at lackingtalent.com> wrote in message
news:slrnbqda2l.8f6.ramen at lackingtalent.com...
> In article <vqcvbu3q46o370 at news.supernews.com>, John Roth wrote:
> >
> > "Dave Benjamin" <ramen at lackingtalent.com> wrote in message
> > news:slrnbqcu85.u0o.ramen at lackingtalent.com...
> >> In article <vqcn9ooasi2f19 at corp.supernews.com>, Emile van Sebille
wrote:
> >> > QOTW:  "...I want to reserve .var for the "with" statement (a la
VB)."
> >> >   --Guido van Rossum
> >>
> >> I saw this, too! Is this a joke? It seems to contradict the FAQ entry:
> >>
> >
http://www.python.org/doc/faq/general.html#why-doesn-t-python-have-a-with-statement-like-some-other-languages
> >>
> >> It does seem like the .dot .prefix would disambiguate the variable
scope
> > as
> >> long as it is used consistently, but I must say it was a surprise to
read
> >> this...
> >
> > Aparently Guido has a number of directions he'd like to take Python,
> > and some kind of *optional* typing is on the list. That's no secret,
> > I've seen references to it a number of times.
>
> Hmm! Well, if it's any indication of the future, ActionScript 2.0 (in
effort
> to follow JavaScript 2.0) and Perl 6 support some degree of optional
typing.
> As long as it doesn't feel "tacked on" or syntactically cumbersome, I'm
for
> it. I'd be especially interested in seeing some sort of type inference.

I expect that's a good part of the reason for letting it simmer for the
last few years. The current proposals aren't completely cooked yet.
There are a number of ways of doing dynamic type checking (not
static type checking, though.) All of them share the property of being
both difficult and ugly to some degree or other.

As far as type inference goes, look at Bicycle Repair Man. It does
a form of type inference to check whether various refactorings are
possible. While I'm certainly not prepared to channel Guido, I think
he's in favor of type inference, if it can be done cleanly, without a lot
of wierd surprises.

John Roth

> -- 
> .:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
> : d r i n k i n g   l i f e   o u t   o f   t h e   c o n t a i n e r :






More information about the Python-list mailing list