Hacker News new | ask | show | jobs
by sizediterable 1646 days ago
Always happy to see companies thinking about typing

I wrote-up a high-level comparison between the type systems of TypeScript and mypy here that might be of interest to type enthusiasts

https://news.ycombinator.com/item?id=29249328

1 comments

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.

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.
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.
You can set up the TypeScript LSP for neovim! It works rather well (though I've begun to favor the Doom Emacs implementation myself).
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.
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.