That reminds me of another reason it’s at odds with what I understand to be idiomatic in normal Rust code: It has the same weaknesses @killercup pointed out in having a function take multiple bools instead of a set of purpose-specific two-variant enums.
As a Canadian, this reminds me of how, when you see 01/02/2020, you have no idea whether that’s February 1st (Canadian DD/MM/YYYY date format) or January 2nd (American MM/DD/YYYY date format) without out-of-band information.
For example, many sites have URLs of the form /namespace/{int}/{int}/ which could get messed up in a refactoring. Examples include:
Note that FiMFiction also exposes chapter primary keys via their /chapters/download/{chapter_pk}/{format_name} route, making for a third integer value which could be confused with the others during a refactor.
The C2 lists on Fanfiction.net are an especially noteworthy example because they essentially abuse the path component of the URL to pass a bunch of integer query parameters.
Suppose they wanted to switch from PHP to Rust as part of a plan to reduce the tendency for bugs and regressions to slip in, but they don’t want to break anyone’s bookmarks.
Should the router API really be introducing another place to mess up a URL like this?
https://www.fanfiction.net/community/Alternate-First-Contact-War/88942/99/4/1/0/10/0/0/
Bear in mind that most of those parameters appear to be indexes into <select> elements, so confusing them would produce no error… you’d just get subtly wrong content in the results listing that gets returned. (eg. if you mixed up the values for the sort order and time range filter, it’d still work and you probably wouldn’t readily notice.)
(Sorry for the delayed reply. The power went out while I was typing the first version of this and it only just came back on.)