[Python-ideas] PEP 484 (Type Hints) -- first draft round

Guido van Rossum guido at python.org
Mon Jan 19 23:13:40 CET 2015


On Mon, Jan 19, 2015 at 12:30 PM, Devin Jeanpierre <jeanpierreda at gmail.com>
wrote:

> On Sun, Jan 18, 2015 at 4:01 PM, Greg <greg.ewing at canterbury.ac.nz> wrote:
> > Do you mean *static* types, or types in general?
> >
> > If they're only for static type checking, this seems a waste of a
> > facility that evaluates things at run time. Moreover, evaluating
> > them at run time is actually counterproductive, since it makes
> > dealing with things like forward references unnecessarily awkward.
> > It also introduces useless runtime overhead. And they only address
> > part of the problem, since they only apply to functions and not
> > other things we might want to specify the type of.
>
> Strong +1. The current proposal is a historical accident, it would not
> be designed this way if it was designed from scratch. That's not a
> nice thing to include in the core language. (Although it does happen
> often, since "practicality beats purity").
>

It's stronger than that. I'd say that all of Python is a historical
accident.


> I like the :: idea.
>

Blechh. It smells of C++ and syntax hacks. PEP 3107 is over 8 years old
(also a historical accident :-). Let's stick with the devil we know.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150119/ffd4e633/attachment-0001.html>


More information about the Python-ideas mailing list