<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>jstimpfle</author><text>It wouldn&amp;#x27;t be difficult to disallow these cases, but is that a problem after all? My opinion is that the requirements should be shaped (also) by what logic is required on the implementation side.&lt;p&gt;And in any case, there&amp;#x27;s no justification to change the style and make an incomprehensible thicket of vague &amp;quot;abstractions&amp;quot;. There&amp;#x27;s at most one to write slightly more logic.</text></comment>