What is the best typed language for back end web development?
15 comments
Unpopular opinion but... most of them are more than good enough. .net with C#, java (though I'd probably use kotlin), typescript, and go are the most popular ones and they will all do whatever you need with pretty great performance if written correctly.
I'd do a simple CRUD app in all 4 of them and see which one I liked best from tooling to language design.
I'd do a simple CRUD app in all 4 of them and see which one I liked best from tooling to language design.
If you are familiar with it TypeScript could be a good choice.
Language preferences are very personal but I personally like Golang. It's kind of like a "batteries included" language and deploying Go, which is copying a binary to a server is awesome!
Language preferences are very personal but I personally like Golang. It's kind of like a "batteries included" language and deploying Go, which is copying a binary to a server is awesome!
It's true if you don't have any other files such as HTML templates or CSS or whatever; which is fairly rare (don't even get my started on stuff like Packer which embed binary content inside the binary executable...).
Nowadays, deploying any project should just be one docker build . away whatever the language.
Nowadays, deploying any project should just be one docker build . away whatever the language.
Is the embedding necessarily a bad thing? I run a site entirely using Go templates and packr to embed the site’s files and it only adds a few MB. Latest version of Go has a built-in way to embed files now through a comment syntax.
If you're serious about using the type system to encode business logic, improve resiliency, and reduce runtime errors: scala is really a great choice. Beware "type astronauts", FP purism, etc. and you'll be able to go very fast. You get access to the whole JVM ecosystem.
Rust is great but more clunky. I'm under the impression F# is a viable alternative.
Rust is great but more clunky. I'm under the impression F# is a viable alternative.
If you're familiar with TypeScript, you could use it on the back-end as well, with Node and a build step or with Deno.
I enjoy using Haskell, because of the type-safety, referential transparency, and stability of interfaces. I use Twain for HTTP server and routing + blaze-html for HTML + Selda for interfacing with SQL. I’ve built my last few projects this way (listed in my profile).
I like Crystal for this, the standard library has support for the most common stuff (HTTP server, JSON/XML parsing, logging, templating), installing additional packages is easy and the build step also.
Nice bonus: the resulting app is native and fast.
Nice bonus: the resulting app is native and fast.
We have great success with F# (both backend and frontend).
Can’t recommend it enough.
Can’t recommend it enough.
I've been using TypeScript and quite like it.
C# or java, if you are Node developer try TypeScript
TypeScript is an amazing beast on backend as well
Java + Spring
PHP
declare(strict_types=1);
declare(strict_types=1);
Scala3
I think actually that the frontend project with all of its thousand of files and components is easier to handle just because typescript helps me so much.