News for hackers. Stuff that matters.
Re:Pyre: Fast Type Checking for Python by cjhanks on Friday May 11, 2018 @08:24PM (#17051680)
I can see how you might say that but... what about...

    std::vector<std::pair<std::size_t, std::complex<float>>> data = SomeMethod();
vs

    auto data = SomeMethod();
Re:Pyre: Fast Type Checking for Python by Too on Saturday May 12, 2018 @12:30AM (#17052477)
Adding types to local variables is quite useless and should be considered redundant and non value adding verbosity. The main driver for typing is at interface boundaries so you know what types of input another function expects.
Re:Pyre: Fast Type Checking for Python by xfer on Saturday May 12, 2018 @02:57AM (#17052856)
No, it's not useless, often i want to know what's the type of a intermediate binding without looking up all the functions/exprs that transformed an input to it, often an editor plugin helps with this, but otherwise it's real pain to understand some parts (this is a problem with rust, lsp server doesn't help with this, but for ocaml merlin works beautifully).
Re:Pyre: Fast Type Checking for Python by dfischer on Saturday May 12, 2018 @03:27AM (#17052930)
I don’t know if I agree with this. If you want to communicate an interface for maintainabilty you’ll declare your type so you know what you’re dealing with in the future.
Re:Pyre: Fast Type Checking for Python by joshuamorton on Monday May 14, 2018 @12:53AM (#17062803)
I'd call that first example nothing but noise. Its probably a bit better with a type alias, but knowing that SomeMethod returns an array of uint/complex pairs doesn't really tell me anything.

If anything, this just shows me bare type information alone isn't useful without accompanying documentation. For example if `SomeMethod` was renamed `CalculateAllEnemyLocations`, it might make sense, but then I get most of the relevant information from the method name.

In other words, you have a bad api, and type information sort of, but not really, makes up for that. But that just means that you're ignoring the real problem.