Re:How Old School C Programmers Process Arguments
by kqr on Sunday January 28, 2018 @02:36AM
(#16250294)
This is something that intrigues me about well-written low-level code. If you make some concessions on expected behaviour, the code can be really clean and simple. But you have to know which concessions are acceptable yet yield this result, and that's super hard, at least to me.
[ Parent
| on HN ]
Re:How Old School C Programmers Process Arguments
by pjmlp on Sunday January 28, 2018 @10:31AM
(#16251650)
Worse, if someone else has to change the code, even if that someone is author a few months/years later, those concessions will be unknown, breaking the code in strange ways very hard to debug.
Re:How Old School C Programmers Process Arguments
by jstimpfle on Sunday January 28, 2018 @04:26PM
(#16253620)
Don't forget that the code is now trivial: It's easy to see corner cases since the logic is so small and therefore quite "round". There is not really room for code "breaking in strange ways". It's rather that we can now think more mathematically and more uniformly about the program's behaviour.
It doesn't matter anymore if a given curiosity (like "-" options) is categorized as a concession or just as the way it's supposed to be. In any way it's the way that makes more sense from a mathematical standpoint. If there really was some client code depending on a curiosity, it's also easy to spot and change. But usually that's not even needed.