3 ms·
There seems to be a drive in some of the core standards to allow as flexible "human" encoding as possible. Instead of writing a tight-as-possible encoding, it's
by MichaelGG 13y ago
There seems to be a drive in some of the core standards to allow as flexible "human" encoding as possible. Instead of writing a tight-as-possible encoding, it's like it becomes a game to see how complicated yet still unambiguous they can make syntax.
HTTP and SIP, for instance, have ridiculous parsing rules and tons of edge cases. The SIP authors even put together a "torture test" RFC where they take glee in making the most insane messages that still parse. And when they don't parse, they suggest the implementation infer the meaning. Seriously.
HTTP and SIP allow newlines in headers that get consumed in parsing, so you can manually word-wrap lines. They allow comments in HTTP messages. SIP (HTTP too?) allows headers _in the URL_.
When a non-committee (TCPIP) or non-academic (SPDY) entity does a spec, they tend to remove a lot of this cruft and realise that human-readability comes second (unlike in programming languages).
- tel 13y agoIn my reading of the RFCs, HTTP doesn't allow headers in the URI. But it does demand that you accept nest comments in header values. Only. These comments appear nowhere else.
- mikeash 13y agoThat's an interesting thought. There is definite advantage in having a protocol be human-readable and human-writable. However, there's a vast gulf between a protocol that you can write if you have the spec at hand and take your time, and a protocol that you can comfortably write by hand routinely, like a programming language. The latter strikes me as a really bad idea, one responsible for much of this craziness.