HACKER Q&A
📣 calderwoodra

Why are all of the best back end web frameworks dynamically typed?


Ruby on Rails, Django, Node JS all have great developer experience, are highly configurable but easy to use and hit the ground running.

Spring, Gin, anything Rust, .Net, etc all are very difficult to configure properly for even the most simple SaaS products.

Why is that? Are there any good statically typed web frameworks?


  👤 ActorNightly Accepted Answer ✓
Because development speed and flexibility matter way more than "correctness". Engineer salary is expensive, and there is software to manage running processes that makes errors in software in niche cases not a big deal because it can just restart the failed container or the failed process, publish logs, and then an engineer can implement a patch.

👤 hitpointdrew
I would argue Gin/Go isn't really statically typed.

I mean sure you can specify that this var is a int32, but pretty much every tutorial, every code snippet out there, will do.

    myvar := 10
And just let Go guess what the type should be. So yeah, Go CAN be statically typed, but in practice it rarely is.

👤 satvikpendem
What do you mean hard to configure? I use Axum with Rust just fine.

👤 throwaway858
IHP is a batteries-included web framework similar to "ruby on rails" for Haskell, with strong static typing.

The website has lots of information and videos and beginner tutorials.

https://ihp.digitallyinduced.com/


👤 gavmor
Because junior developers don't know how to do Type-Driven Development.

👤 pharmakom
Suave is the best web framework I have ever used, and it’s on the extreme end of the strong-static typed spectrum.

I don’t think the dynamically typed ones are better, just better known.


👤 gardenhedge
Spring is pretty simple, it works out of the box (spring boot) and the docs are good.

👤 catlover76
I don't think Django or most NodeJS frameworks are all that pleasant to use.

.NET MVC is a very good framework, but I know the devops can be weird and a pain.

Overall, most frameworks get in the way anyways, IMO. I prefer to cobble together several modules that each do one thing well. E.g. use FastAPI for the endpoints, and any unrelated ORM you like for DB stuff, etc.


👤 mixmastamyk
[delayed]

👤 smrtinsert
Clearly a question rooted in grounded science (not).

👤 davidthewatson
I found IHP straightforward:

https://ihp.digitallyinduced.com/

despite not remembering much haskell!

This assumes you can get past nix for the install.

I find IHP well-designed. I just wish the licensing scheme were more transparent.