Closed
Description
Using a ?
in path definitions has limitations. For example, if you want to match a path that has an optional segment in it, you actually need two of them: one for the parameter name and another for the slash. So people end up using paths like /users/:userID?/?edit
.
I'd like to suggest that instead of ?
we use (
and )
to indicate that portions of a path are optional. This gives us the ability to indicate where the optional portion of a path begins and ends. So you can do /users(/:userID)/edit
which, at least to me, is a little cleaner.
This may help us address #820
See also #929