features I care about:
- type-safety of route parameters
- avoid
ginContext.Param
etc - inspired by Elm routing, which seems to be insipired by an OCaml example
- avoid
- performance
- don't want to be a cute but unusable api
- can provide an accounting of the routes on-demand
- print as a string
- explore as a datastructure
- url helpers, to avoid route strings in the app
is the best way to do the DSL like this:
route.StaticSegment("api", function() {})
route.ParameterSegment[int](function(id: int) {
// but how do we pass this into the handlers defined in here?
})