3 ms·
Have you tried Typescript? It has one of the best type systems among mainstream (not FP) languages, IMO.
by golergka 6y ago
Have you tried Typescript? It has one of the best type systems among mainstream (not FP) languages, IMO.
- Shacklz 6y agoTS is probably my favorite language out there, so yes, I definitely did :) But just for "one-off"-scripts, JS usually does the job pretty well. For bigger scripts or scripts where I want to reuse/share parts, typescript is an option - but it comes with a few hurdles: Most of the scripts I'm talking about work with zero npm-dependencies, while typescript adds at least one. Furthermore, I either have to take care of compiling it, or use ts-node - one more dependency; and in both cases, I can't avoid the usual es6 vs. commonJS shenanigans. It's a bit of overhead to get going; always worth it if I spend more than a few hours on a script, but I can do without if it's just a few lines that I will hardly ever see again.
- dmux 6y agoI think Deno may be a good choice in this use case: single binary that has a good standard-lib makes it seem like a good candidate for simple shell and pipeline scripting.