News for hackers. Stuff that matters.
Re:Moving from Ruby to Rust by robrtsql on Friday February 15, 2019 @11:31AM (#19172176)
My issue with mypy is that I would like it to verify that I'm passing the right types into functions from my dependencies. For example, I do a lot of scripting with Python and boto3 to interact with AWS, and my scripts often fail the first time because I misread the field name or structure of a JSON object that goes into or comes from the API. It makes me wish I was using Java or Go, because at least then the compiler would have told me it was wrong.

I'm not sure if a solution to this exists yet. It seems like it's up to the dependency to adopt mypy as well?

Re:Moving from Ruby to Rust by j88439h84 on Saturday February 16, 2019 @01:22PM (#19180037)
Yeah I think so.

There is monkeytype which can infer the types from test runs and insert them into source, so its quite easy to add annotations.