This won't be the most efficient way to perform routing in an application, but i found the implementation really simple to understand and the error messages for the end-user seem really clear as well. It also helps if the language used allows for embedding DSLs that are easy to read for the end-user. (could be macros in lisp/elixir, well named functions with a little sprinkling of infix operators in OCaml, Haskell etc)
A little show HN in the comments: I've been exploring this approach and others [2] for comparison, and although i've moved away from this style as I progress in learning more OCaml, it was a fun little exercise to explore a CPS based typed routing approach. [3]
[1] https://dbp.io/talks/2016/fn-continuations-haskell-meetup.pd...
[2] https://github.com/anuragsoni/routes
[3] https://github.com/anuragsoni/routes/blob/0.1.0/src/routes.m...