Ask HN: Which static compiled language do you use for web backend?
There are many mainstream dynamic language for web backend development, but so pity not many mainstream static compiled language for backend, but for medium to large projects, the static compiled language can give big benefits.
As i know, the mainstream for web backend just goes: C++ Java C# Go Rust (V D Nim Crystal OCaml Sml Haskell Idris maybe too good to be mainstream), with Java/Go as the king.
Maybe i am wrong, can you say what are you using or what you used in the past few years?
3 comments
[ 3.1 ms ] story [ 14.4 ms ] thread* In order of developer productivity: Nim, Crystal, Go, Swift, D, C# / .NET, Java, Rust, Haskell / \ML / UrWeb (for most people), C / C++.
In order of performance, roughly: C / C++, Nim / V (low-cost languages that compile to C), Rust / Crystal / D / Swift (LLVM ahead-of-time optimized static languages), Go, UrWeb?, JVM languages (worse in low-memory containers), .NET languages, Haskell, TypeScript / etc (NodeJS).
* In order of good Web Framework availability: Go, Rust, .NET, Java, Haskell, Crystal, C++.
* In order of safety: UrWeb, OCaml, Haskell, Nim ... ... C / C++ last.
All my backends are currently written in haskell, usually with elm on the frontend.
This is largely due to my subjective but, negative experience with dynamic and/or object-oriented languages, and the discovery of abstract data types and their direct connections to logic (i.e. a product type is a logical AND, a sum type is logical OR and a function type is just a logical implication etc.)
I’m still keeping rust in my back-pocket though, for those times when I exhaust the latency guarantees of haskell; but compared to php/python/ruby, haskell is a walkover win.
This does require you to have a decent onboarding plan, but with Elm as the first step it’s trivial to get people hooked on haskell, since its type classes provide an extreme improvement over what Elm provides. And you essentially get the motivation for the fundamental type classes (functor, applicative, monad) for free, since people have been using all the abstractions discretely in Elm, and suddenly get them all connected in a neat package in haskell.