Web frameworks do handle query params with various mechanisms:
This approach is mostly fine, as long as you know from where a parameter comes.
In Spring you use the @RequestParam
annotation when you have simple parameters.
But when you want to group them in a class you don't use it.. #wtf
Also, that same class can be bound from the form body too... convenient? eh.
In Cask there is no annotation, so it is ambiguous in my opinion.
You need a special compiler for this, essentially a new language.
People have to learn how it works, there's probably no syntax highlighting, no autocomplete etc.
Similar to special route file approach, people need to learn it.
Not a huge deal I guess.
If you look at http4s' approach,
you can see that if the query param is not found, it falls through.
It is customizable, but more work for you. eh.
Essentially you'll get a 404.. which is not a good choice IMO.
Rarely any framework does this, and you rarely want to handle the same path in 2 places.