> On Sun, Sep 04, 2016 at 12:31:26PM +0100, Mark Shannon wrote: > >> As defined in PEP 526, I think that type >>annotations become a hindrance to type inference. In Haskell-like languages, type annotations have no ability to influence whether types can be inferred. The compiler infers a type for everything, whether you annotate or not. The annotations serve as assertions about what the inferred types should be. If they don't match, it means the programmer has made a mistake somewhere. I don't think it's possible for an annotation to prevent the compiler from being able to infer a type where it could have inferred one without the annotation. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4