Comment by skybrian
A fundamental limitation is that static analysis enforces guarantees when a compiler can see and understand all the code at the same time.
It's great when you compile large amounts of code written in the same language into a single binary.
It's not so great for calls between languages or for servers communicating across a network. To get static guarantees back again, you often need to validate your inputs, for example using something like Zod for TypeScript. And then it's not a static guarantee anymore; it's a runtime error.
Database tables often live on a different server than the server-side processes that access them, so mix-and-match between different schema versions that the compiler never saw together is possible in most systems.
To prevent this, you would need some kind of monolithic release process. That runs into lifecycle issues, since data is often much longer-lived than the code that accesses it.
> you often need to validate your inputs, for example using something like Zod for TypeScript. And then it's not a static guarantee anymore; it's a runtime error.
True, but validating at the boundaries and having a safe core is much better than having the unsafe portion everywhere imo.