Re:Show HN: UXY – adding structure to Unix tools
by rumcajz on Monday May 20, 2019 @03:01AM
(#19958110)
Postel's principle: By liberal in what you accept... It means that the tool won't crash just because there's weird input.
Re:Show HN: UXY – adding structure to Unix tools
by adrianratnapala on Monday May 20, 2019 @06:00PM
(#19965725)
But as written, the definition permits generating the weird output. Which ignores the other arm of Postel's principle.
You could have the format definition forbid these characters; and then in the section about Postel's principle have "If you choose to accept forbidden characters, you MUST treat them as '?'".
Re:Show HN: UXY – adding structure to Unix tools
by wgoodall01 on Monday May 20, 2019 @09:30AM
(#19960119)
Isn't it better to crash than to fail silently, possibly storing malformed data?
Isn't it better to forbid them? Presumably you are saving the space for further extensions, but this is allowing readers to interpret them as '?'
Similarly what is the rationale for interpreting control characters is '?'? Instead you can ban them, with the possible exception of treating tabs as spaces.