News for hackers. Stuff that matters.
Re:TypeScript for Pythonistas by kitd on Friday December 17, 2021 @02:07PM (#29596855)
I've been writing Python for the last few months. This week I've been hacking on some JS scripts. I was missing the type hints I'd get in Python via vscode. Until it occurred to me that vscode might support jsdoc out of the box. And lo and behold it does. I was pleasantly surprised.

Sometimes hints and intellisense are 90% of what you need from a type system.

Re:TypeScript for Pythonistas by ddoolin on Friday December 17, 2021 @03:14PM (#29597776)
VSCode's support of TypeScript is a boon even if you're writing vanilla JS, because it will pick up types defined by your libraries in use and now you can very quickly/easily get to the interface information without having to dig into source.
Re:TypeScript for Pythonistas by dopeboy on Friday December 17, 2021 @03:27PM (#29597910)
TS in VS code is such an elegant experience. I wanted my terminal vim to work (my setup for the past five years) but the productivity gains were too much to ignore.
Re:TypeScript for Pythonistas by striking on Friday December 17, 2021 @03:30PM (#29597936)
You can set up the TypeScript LSP for neovim! It works rather well (though I've begun to favor the Doom Emacs implementation myself).
Re:TypeScript for Pythonistas by mattwad on Friday December 17, 2021 @02:42PM (#29597381)
agree.. you don't even need "strict: true" to get 90% of the value of Typescript + probably 50% more dev time back not fighting types, but I get downvoted whenever I suggest this. I mean blame the TS team for including it if you think it's such a bad feature.
Re:TypeScript for Pythonistas by striking on Friday December 17, 2021 @03:35PM (#29597998)
I don't totally disagree, but I've found that you lose whatever dev time you might have thought you gained where bugs crop up and the type system isn't helping you fix them. I've ended up in a situation where the codebase was typed and the test cases weren't, and the test cases had plenty of issues that were ridiculously hard to debug because we let the tests remain untyped.