|
|
Log in / Subscribe / Register

Opposition to Python type hints

Opposition to Python type hints

Posted May 7, 2015 12:17 UTC (Thu) by ballombe (subscriber, #9523)
Parent article: Opposition to Python type hints

The paradox is that statically typed languages like Haskell does not require you to add type annotation because type inference will be good enough in most case.


to post comments

Opposition to Python type hints

Posted May 7, 2015 15:08 UTC (Thu) by kjp (guest, #39639) [Link] (2 responses)

As a middle ground, Rust only forces you to declare types of function parameters.

I do agree with some of the push back on the python side, it does change the feel of the language, and perhaps people should be served moving elsewhere and giving up on using python for large codebases.

Opposition to Python type hints

Posted May 8, 2015 20:36 UTC (Fri) by peter-b (guest, #66996) [Link] (1 responses)

> As a middle ground, Rust only forces you to declare types of function parameters.

That's not strictly true; Rust forces you to declare types wherever it can't infer them. Of course, *in practice* this usually means that you only need to declare the types of function parameters. ;-)

Opposition to Python type hints

Posted May 14, 2015 10:26 UTC (Thu) by ssokolow (guest, #94568) [Link]

Or when it *won't* infer them by design.

Closures infer type signatures but functions don't because an explicit decision was made that functions should be fundamental units of API definition with no implicit dependencies to complicate reasoning about or parsing the code.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds