2 ms·
A very wordy post, no really sure the point of it. What I can say though is that Postel's Law is a pile of rubbish that sounds sage and wise and leads to softw
by andrewstuart 2y ago
A very wordy post, no really sure the point of it.
What I can say though is that Postel's Law is a pile of rubbish that sounds sage and wise and leads to software problems.
Make software clearly defined in what you output and what you accept. Clear and strongly typed data interfaces help everyone get along with minimal bugs. Being “liberal in what you accept” is a recipe for errors.
Ref:
The Harmful Consequences of the Robustness Principle
https://datatracker.ietf.org/doc/draft-thomson-postel-was-wrong/ https://datatracker.ietf.org/doc/draft-thomson-postel-was-wr...
- prepend 2y agoI think this may be a scissor statement for developers [0] as people seem to really be on one side or the other. I remember years ago I wrote a Java package to sit on top of DOMs and let you query and manipulate in memory. People at my company liked it and so maybe like 20-30 people used it as the in memory store for passing info around this workflow engine. Anyway, I assumed you would always have a DOM or some Nodes and if you didn’t, allowed null pointer exceptions to throw in the right places (what I thought was right). Some people liked starting with null and populating later and my logic would blow them up. My response was “fix your code, don’t do that.” My package was clearly documented for what to do and when. But one day another senior dev came to me to plead the case for some mids who were writing all this extra code to prehandle those nulls. I still didn’t change my package because I thought it was most efficient to use it properly than to add in extra logic that sort of broke the interface. I did tell them that I welcomes a pull request to add the functionality. Looking back, I wish I had been more liberal in what I accepted because it was causing a lot of emotional pain by people sort of lobbying others. “Minimal bugs” depends on where in the stack you look. [0] https://slatestarcodex.com/2018/10/30/sort-by-controversial/ https://slatestarcodex.com/2018/10/30/sort-by-controversial/
- shadowgovt 2y agoAll nothings are not equal. http://thecodelesscode.com/case/6 http://thecodelesscode.com/case/6
- chrismorgan 2y ago> https://datatracker.ietf.org/doc/draft-thomson-postel-was-wrong/ https://datatracker.ietf.org/doc/draft-thomson-postel-was-wr... The original draft had an excellent name, and expressed a strong position. It was picked up and the consensus was published as RFC 9413 in mid-2023.