[Python-ideas] Optional Static Typing -- the Python Way

Steven D'Aprano steve at pearwood.info
Sun Aug 24 13:59:55 CEST 2014


On Thu, Aug 21, 2014 at 02:30:03PM +0000, Brett Cannon wrote:

> P.S.: Off-topic for this email but something I don't think has been
> mentioned more than once, type hinting like we are proposing is exactly
> what Dart does and it is nice. Built-in API documentation of interfaces
> along with IDE support at the API makes all of this worth it.

For anyone not familiar with Dart, I think it is worth reading the Dart 
justification for static type hinting in a dynamic language:

https://www.dartlang.org/articles/optional-types/

https://www.dartlang.org/articles/why-dart-types/

It's not quite the same as Guido's proposal, for example in Dart the 
type hints have no runtime effect at all, but I think it demonstrates 
that this is a proven approach and can work well with a dynamic language 
like Python without compromising the dynamic nature of the language.


-- 
Steven


More information about the Python-ideas mailing list