[Python-ideas] Optional static typing -- late to the party

David Mertz mertz at gnosis.cx
Wed Aug 20 19:50:18 CEST 2014


Hi Bob,

I enjoyed watching your talk (on video, not live), and I certainly see the
appeal of a Haskell-like type system.  However, what we seem to be
discussing here with mypy annotations looks a lot closer to a C type system
than to a Haskell type system.  All those things that PyContracts get us
are easy enough in Haskell--why aim so low if we are thinking of a change
in Python?


On Wed, Aug 20, 2014 at 10:42 AM, Bob Ippolito <bob at redivi.com> wrote:

> On Wed, Aug 20, 2014 at 10:23 AM, David Mertz <mertz at gnosis.cx> wrote:
>
>> I have to say that I find the capabilities in PyContracts--which are
>> absent currently in mypy--to be very compelling.  If we are going to add
>> encouragement to use type annotations, adding richer types seems extremely
>> worthwhile.
>>
>
> It's easy to check any expressible condition at runtime, but this is not
> the case ahead of time as with a static analysis tool or linter. It'd be
> great to have this sort of capability in mypy, but what you're asking for
> is at the fringes of current research and will not be practical to add to
> Python any time soon.
>
> -bob
>
>


-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140820/af0274d4/attachment-0001.html>


More information about the Python-ideas mailing list