3 ms·
> That’s something users do. The API doesn’t imply anything is related. Querying ids by prefix doesn’t make any sense for a normal ID type. Just making this o
by fiddlerwoaroof 3y ago
> That’s something users do. The API doesn’t imply anything is related.
Querying ids by prefix doesn’t make any sense for a normal ID type. Just making this operation available and part of your public API indicates that prefixes are semantically relevant to your API’s ID type.
- klodolph 3y ago“Prefix” is not the same thing as “directory”. I can look up names with the prefix “B” and get Bart, Bella, Brooke, Blake, etc. That doesn’t imply that there’s some kind of semantics associated with prefixes. It’s just a feature of your system that you may find useful. The fact that these names have a common prefix, “B”, is not a particularly interesting thing to me. Just like if I had a list of files, 1.jpg, 10.jpg, 100.jpg, it’s probably not significant that they’re being returned sequentially (because I probably want 2.jpg after 1.jpg).
- afiori 3y agoby this logic the file "foo/bar/" correspond to the filename "f:o:o:/:b:a:r:/" (using a different caracter as separator)
- fiddlerwoaroof 3y agoExactly