IssueRaiser

Simple example: Say you're working with an external library.

Simple example: Say you're working with an external library. And say you need to work with this function: def convert_to_int(val): .... What type should val be? Do you pass the object, or a string representation of the object, or...? The problem with Python - and non-statically-typed languages in general - is that function signatures don't need to be defined upfront, which leaves it up to the programmer to figure out the inner workings of the functions. This is a huge pain point when working with other people's code. Python 3 introduced function annotations, which is great. But again, the problem here is that function annotations are opt-in. It's still up to the developer to add the annotations.

Posted by yen223 on May 1, 2015, 12:19 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.7,000 issues0 comments

hackernews (Other)

Simple example: Say you're working with an external library.

yen223May 1, 2015, 12:19 AM

Simple example: Say you're working with an external library. And say you need to work with this function: def convert_to_int(val): .... What type should val be? Do you pass the object, or a string representation of the object, or...? The problem with Python - and non-statically-typed languages in general - is that function signatures don't need to be defined upfront, which leaves it up to the programmer to figure out the inner workings of the functions. This is a huge pain point when working with other people's code. Python 3 introduced function annotations, which is great. But again, the problem here is that function annotations are opt-in. It's still up to the developer to add the annotations.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue