Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Because of this inherent hierarchical inconsistency in standard URI formats, my projects sometimes internally use a reordered variant of the URI we call 'SURT form'. For example:

http://(com,google,mail,)/sub/folder

The parentheses and commas make it absolutely clear that you're dealing with a reordered URI-authority-component.

Even the trailing comma and off-paren are significant in our most common use-case: determining whether a URI falls within a certain hierarchical collection-scope by making a simple prefix-comparison. Compare the prefixes:

http://(com,google

http://(com,google,

http://(com,google,)

The first would also accept < http://(com,googlepages, > URIs, while the second would accept all subdomains of < com,google, >, and the third accepts only URIs strictly on < com,google, > but not its subdomains.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: