4 ms·
The thing is, javascript performance is mostly "good enough", and honestly that's what really matters. When you have workloads that are mostly io bound, having
by claytongulick 7y ago
The thing is, javascript performance is mostly "good enough", and honestly that's what really matters.
When you have workloads that are mostly io bound, having syntactic sugar like js async/await to avoid blocking is really a huge strength.
When we write systems, we operate under constraints, and frequently the largest constraint is time to market rather than pure performance.
Dynamic typing can be a huge strength for TTM.
If performance was the only concern, we'd all be in straight C with inline asm.
- saagarjha 7y agoWhat’s TTM?
- smabie 7y agoI'm not convinced that dynamic typing helps productivity. In my experience, an expressive type system allows one to deploy code much more quickly. The key word, of course, is expressive. Neither Go, nor Java, btw, qualify as having expressive type systems.
- Chyzwar 7y agoMy guess is that productivity is really from the ecosystem. It is easier to create and use modules in JS than Java/C#. You do not need to mend your codebase to use modules. Once you have all these third party modules it easier to move fast with the product. Structural typing fit really nicely with existing JS. Typescript have all expressiveness of JS and granular control of type safety. Given this, there is a lot of sharp edges.
- tikkabhuna 7y agoDefinitely! And tooling. Java is verbose but IntelliJ writes a lot for me. `main` turns into[1]: public static void main(String[] args) { } Because of this and Lombok I don't find Java particularly taxing to write. I often prefer writing Java as my IDE can provide me better information about the code. [1] https://www.jetbrains.com/help/idea/using-live-templates.html https://www.jetbrains.com/help/idea/using-live-templates.htm...
- register 7y agoAnd what is an example of an expressive type system? I am asking just out of curiosity.
- sweeneyrod 7y agoHaskell or OCaml
- remexre 7y agoFor the frontend, PureScript (or Reason, or OCaml with BuckleScript) work well; Rust inherits most of Haskell's type system as well.
- smabie 7y agoI would say: Scala, Haskell or OCaml.
- sideeffffect 7y agoWhat sweeneyrod said. Scala is also OK. It has advantage over both in some aspects, but loses in other aspects. Neither of Haskell, Scala or OCaml is _the best_ -- there just isn't the perfect language. Yet! :) Features I care about: * Type classes: Haskell, Scala * Module system: OCaml, Scala * structural subtyping / row polymorphism: OCaml * Higher-kinded types: Haskell, Scala Other important features, but not related to the type system: * Powerful runtime system (multicore support, green threads, ...): Haskel, Scala (kinda, with the TypeLevel libraries, but still not 1st class) * pure functional programming focus: Haskell, Scala (kinda, with the TypeLevel libraries, but still not 1st class) * compiling to JavaScript (so that you can use 1 language for both backend and frontend): Scala, OCaml ... maybe PureScript would tick the most boxes ¯\_(ツ)_/¯