<story><title>How Old School C Programmers Process Arguments</title><url>http://www.usrsb.in/How-Old-School-C-Programmers-Process-Arguments.html</url></story><parent_chain><item><author>yongjik</author><text>So it will admit any combination of -n and -x.  In particular, these things won&amp;#x27;t raise an error:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    find - hello
    find - - hello
    find -xnxn hello
    find -x -n -x hello
    find -xxx -nnn -xn hello
&lt;/code&gt;&lt;/pre&gt;
Yes, the code has an impressive logic density, but there&amp;#x27;s a reason why modern programmers moved away from such style.</text></item></parent_chain><comment><author>userbinator</author><text>&lt;i&gt;In particular, these things won&amp;#x27;t raise an error&lt;/i&gt;&lt;p&gt;They don&amp;#x27;t necessarily need to be. Repeating the same option can either have no effect (|), invert the option (^), or increase something (as in -vvvvv.) IMHO it&amp;#x27;s a good thing when there are no error cases --- it basically means the entire input space has a defined effect.</text></comment>
<story><title>How Old School C Programmers Process Arguments</title><url>http://www.usrsb.in/How-Old-School-C-Programmers-Process-Arguments.html</url></story><parent_chain><item><author>yongjik</author><text>So it will admit any combination of -n and -x.  In particular, these things won&amp;#x27;t raise an error:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    find - hello
    find - - hello
    find -xnxn hello
    find -x -n -x hello
    find -xxx -nnn -xn hello
&lt;/code&gt;&lt;/pre&gt;
Yes, the code has an impressive logic density, but there&amp;#x27;s a reason why modern programmers moved away from such style.</text></item></parent_chain><comment><author>kqr</author><text>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&amp;#x27;s super hard, at least to me.</text></comment>