3 ms·
> Prototyping is often easier and faster with plain JS I disagree, especially in the realm of AST-crawling, that having type hints in the IDE has been extremel
by madeofpalk 4y ago
> Prototyping is often easier and faster with plain JS
I disagree, especially in the realm of AST-crawling, that having type hints in the IDE has been extremely beneficial in moving fast.
- nine_k 4y agoI have very often seen prototype code crafted in a REPL, not in an IDE. That's where the fluidity comes in handy. Type-level refactoring tools don't seem to be very powerful at the moment, too; without them, you can end up with some legwork when you change a design decision (a frequent thing while prototyping), even if you carefully aliased every type (which is legwork in its own right, because trivial cases like 2-tuples are plentiful). Fortunately, TS allows you to gradually type your code, and rely on inference in many cases (not as much as Haskell, but still).
- jakear 4y agoWhat you want is a prototyping REPL, in your IDE, that gives you type hints, type aware autocomplete, and inline type errors, but knows to back the fuck off when you want to just run the code and perform simple type-stripping rather than erroring out and telling you to fix types or GTFO. Bonus points if it comes in notebook form so you get a nice convenient run button, a solid multiline text editor, and markdown-powered persistence format. Thankfully, this already exists: https://marketplace.visualstudio.com/items?itemName=jakearl.handydandy-notebook https://marketplace.visualstudio.com/items?itemName=jakearl.... . And it supports every language your shell does! (I made it)