4 ms·
If you're willing to use transpilers, why stick to JS at all, when you have a wealth of languages available? Scala, Purescript, Haskell, Elm, ...
by Peaker 9y ago
If you're willing to use transpilers, why stick to JS at all, when you have a wealth of languages available?
Scala, Purescript, Haskell, Elm, ...
- _ar7 9y agoBecause JavaScript 1. By far, has the largest ecosystem. 2. If you use a linter, a typechecker (TS or flow), and transpile your code (TS or babel or both), JavaScript is actually a pretty nice language to work in. Sure it's a chore to set up all the initial tooling, and learn the ins and outs. However, once you're past that, it's usually not worth it to switch.
- Peaker 9y ago1. The ecosystem is available via bindings too (to most transpiled languages) 2. It's still far from the state of the art in PL design and missing: * Nice static typing with type inference * Nice guarantees about null access * Nice guarantees about interop between client and server * ...
- unclebucknasty 9y ago>It's a chore to set up...and learn... >However, once you're past that, it's usually not worth it to switch. That is somewhat circular and can be said of virtually anything. That is, for every minute you invest in a tech, the degree to which it is worthwhile to switch to another tech diminishes. I'm speaking primarily about tech like frameworks that is aimed at making us more productive. The exception might be a truly revolutionary new tech that sharply boosts productivity, but also has a very low learning curve. However, that scenario seems particularly unicorn-ish where JS frameworks are concerned.
- WorldMaker 9y agoThe closer the transpiled language to JS the lower the impedance mismatch. Whatever language I write in, I may need to dive into debugging it as JS. Whatever language I write in, I likely have to use/adapt JS code samples from libraries and dependencies written in JS. More often than not that's a paper-cut; Haskell often has a huge impedance mismatch from x86 assembly but you can still debug it pretty well and FFI into assembly libraries with varying levels of ease based on library documentation. But especially when you are working with other developers and a mixture of skill levels, impedance mismatches are useful paper-cuts to try to minimize.
- Peaker 9y agoThat argument can be used to justify using assembly because you would sometimes have to drop down to assembly level when debugging native code.
- WorldMaker 9y agoI mentioned that. There are still programmers that do justify using assembly that way, and many historically. There are many programmers that just C/C++ over C#/Java/et al for very similar reasons. I agree, it's not a strong argument, but it is an applicable argument to the discussion. There are trade-offs in every decision, and this is a consideration in those trade-offs.