|
|
Subscribe / Log in / New account

Opposition to Python type hints

Opposition to Python type hints

Posted May 8, 2015 20:36 UTC (Fri) by peter-b (guest, #66996)
In reply to: Opposition to Python type hints by kjp
Parent article: Opposition to Python type hints

> 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. ;-)


to post comments

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 © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds