Re:Python Type Hints – *args and **kwargs
by Already__Taken on Tuesday August 29, 2023 @05:09PM
(#37314138)
I'm not sold on this. Often I type the output I want to get, and reverse the code to get there. and that's faster because it's now all auto completing.
Re:Python Type Hints – *args and **kwargs
by throwaway2037 on Tuesday August 29, 2023 @08:38PM
(#37316137)
Interesting point. What language?
Re:Python Type Hints – *args and **kwargs
by Already__Taken on Thursday August 31, 2023 @01:10AM
(#37332719)
That's been my experience of powershell and typescript. To a lesser extreme python because its type hints are a bit crap.
Though I can see why you might not agree after trying an extreme like Rust. Sometimes I want to run a broken program to stop the debugger and see what I'm dealing with and rust won't do that.
To be fair: 15 years ago, people were writing a lot of Java code that effectively used dynamic typing by passing around Object references, then casting to some type (unknowable to the reader) when using. (C#: Same.) It was infuriating, and also very difficult to read and maintain. Fortunately, most of that code is gone now in huge enterprise code bases.