Just to clarify this point: I’d be pretty surprised if that happened much in practice; I’d expect the framework to provide extractors like Path and Glob that correspond directly to the URL matching syntax, and for those to be nearly universally used. Custom extractors will almost certainly be focused on parsing out other request data.
IOW, looking at just the endpoint definition, it should always be clear which arguments are extracted from the URL.
That said, I do agree that there are downsides to doing this positionally: I can imagine refactoring the URL structure of your app, but forgetting to update the endpoints, and getting some confusing errors as a result. With named parameters, either things would just keep working, or you’d more quickly get to a clear-cut error.
It’s worth talking about what Actix-Web does here, which is basically “support both”. In particular, for Path<T> in Actix, the T needs to be deserializable from the path match. So you can do named matches, but then you need to write a dedicated struct with field names matching the URL pattern. That seems pretty heavyweight to me, and I’d like to see if we can do better.
As I mentioned above, one possibility would be to eventually leverage const generics, making it possible to write the name directly in the type, getting the best of both worlds: Path<"id", u64>.