Blog-Post
Type-safe HTTP routing in Java and Rust
In recent years, the trend in our pop-culture industry has been to favour static and strong typing as well as build-time checks over dynamic typing and techniques like late binding. Where possible, you are expected to use the compiler for correctness checks instead of unit tests.
Even though the Java language is statically typed, its type system is often considered to be not very helpful. Web applications written in Java are traditionally bristling with weakly typed APIs, heavy use of reflection, and lots of annotations that are interpreted at runtime.
Let’s see how far the trend towards build-time checks has been adopted in the Java ecosystem when it comes to writing web applications, how it compares to what’s done in the Rust community, and what benefits and weak points these techniques have.