Open doriantaylor opened 1 year ago
How many schemes are there that actually use a '.'?
The answer is fourteen:
$ curl -s https://www.iana.org/assignments/uri-schemes/uri-schemes.txt | sed -n '/^\([a-z][^ ]*\)/ s/\([^[:space:]]*\).*/\1/ p' | grep '\.' | wc -l
$ 14
RFC2396 § 3.1 states that the grammar for a URI scheme is:
whereas
.register_scheme
usesconst_set
and the grammar of Ruby constants is inconsistent with the grammar for a URI scheme:How much trouble would it be to switch to a
Hash
keyed bySymbol
s, so that it's possible to register (compliant) URI schemes with hyphens,+
signs, dots?