[Python-ideas] Optional static typing -- the crossroads

Guido van Rossum guido at python.org
Wed Aug 20 01:45:27 CEST 2014


On Tue, Aug 19, 2014 at 2:18 PM, Juancarlo Añez <apalala at gmail.com> wrote:

>
>
> On Sun, Aug 17, 2014 at 12:33 AM, Guido van Rossum <guido at python.org>
> wrote:
>
>>
>> (2) For type annotations, should we adopt (roughly) the mypy syntax or
>> the alternative proposed by Dave Halter? This uses built-in container
>> notations as a shorthand, e.g. {str: int} instead of Dict[str, int]. This
>> also touches on the issue of abstract vs. concrete types (e.g. iterable vs.
>> list).
>
>
> Maybe we've been missing that in most programming languages the
> sub-language for describing types is separate from the sub-language for
> describing algorithms. It is so in Haskell, and in C, and in LISP, and many
> others.
>
> It should be OK if similar constructs mean different things in each
> sub-language, as the necessary symbol reuse (if one omits APL) come mostly
> from the IBM keyboard and ASCII.
>
> Personally, I'd like to type less, as is most often the case with current
> Python. Beyond that, I agree it is important that the adopted syntax does
> not mislead.
>

Actually, Python has a long tradition of reusing the same sub-language for
things that are different sub-languages in other languages. Starting with
'int' being callable, in fact. :-)

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


More information about the Python-ideas mailing list