It was thus said that the Great Petite Abeille once stated: > Looking at the various implementations of the URL/URI/IRI stack in mainstream libraries, one has to face Jon Postel's robustness ghost ?. > > Exhibit ? 1: Google's own net/url/url.go ? > > // See RFC 3986. This package generally follows RFC 3986, except where > // it deviates for compatibility reasons. > > Indeed. A very pragmatic approach to reality, taking the robustness > principle to heart: pretty much anything goes. Such is life. > > > Exhibit ? 2: Sean Conner's own Parsing Expression Grammar ? ? ? > > A work of unearthly beauty which actually follows the RFC to the letter. Not quite. I explicitly ignore this bit of RFC-3987: ... with the restriction that private UCS characters can occur only in query parts. as that was a bridge too far even for me. I will also decode a path like "/foo%2Fbar/" as "/foo/bar/", ignoring the sematics of the encoded slash. > The anti-thesis of Postel's law, as strict as the MUST imperative. > > Both pros and cons of Postel's injunction can be argued ad nauseam. > > What does Gemini want, as a protocol? Leniency as provided by Exhibit ? 1? > Or strictness as demonstrated by Exhibit ? 2? > > It is my personal opinion that Postel's Law is the root of all evils as we > know them to this day: any old garbage can travel over the pipe, and you > must do your best to handle it. Good luck to you. > > This is nonsensical. We know better by now. > > Protocol MUST be strict. This is why we have them in the first place. To > clearly define what's legal or not, protocol wise. > > What does Gemini want? While I do agree with the sentiment [1], allow me to play the Devil's Advocate here and mention one word: XHTML---HTML but with the strict parsing rules of XML. To say it was unpopular is an understatment. Not to mention that XML itself is unpopular (but perhaps for reasons other than its strict parsing rules). Become too strict, and people complain. -spc (But become too lax, and other people complain ... ) > ? https://en.wikipedia.org/wiki/Robustness_principle > > ? https://github.com/golang/go/blob/master/src/net/url/url.go > Even though one would have hoped Google would have learned from Sun's mistakes. Apparently not. Perhaps the same team was involve in both Java and Go implementations. Go figure. > > ? https://github.com/spc476/LPeg-Parsers/blob/master/iri.lua > > ? http://www.inf.puc-rio.br/~roberto/lpeg/ > > ? https://bford.info/packrat/
---
Previous in thread (1 of 4): 🗣️ Petite Abeille (petite.abeille (a) gmail.com)
Next in thread (3 of 4): 🗣️ Petite Abeille (petite.abeille (a) gmail.com)