Chris's Wiki :: blog/programming/IdiomUnderstandability Commentshttps://utcc.utoronto.ca/~cks/space/blog/programming/IdiomUnderstandability?atomcommentsDWiki2012-08-26T01:53:07ZRecent comments in Chris's Wiki :: blog/programming/IdiomUnderstandability.By Chris Siebenmann on /blog/programming/IdiomUnderstandabilitytag:CSpace:blog/programming/IdiomUnderstandability:c31d012aab67b5235ce27d26bf8ea44f0158a9deChris Siebenmann<div class="wikitext"><p>I think I may have been unclear; let me try again. I feel that the C
idiom for 'repeat N times' is more clear and less tricky (to someone who
knows C) than the Python idiom for the same thing (to someone who knows
Python). Any C programmer should get the repeat N times idiom in C, but
a Python programmer can reasonably be slowed down and puzzled by the
Python version because it involves some tricks and is kind of indirect.
I can see a normal Python programmer worrying that there is something
special that they don't understand about the use of <code>_</code> in the
'<code>for _ in xrange(0, max): ...</code>', for example.</p>
</div>2012-08-26T01:53:07ZFrom 85.0.112.218 on /blog/programming/IdiomUnderstandabilitytag:CSpace:blog/programming/IdiomUnderstandability:b14eb9aa27e10be40ef74db02574d48f3d71f0efFrom 85.0.112.218<div class="wikitext"><blockquote><p>When I talked about the C code being more immediately understandable, I meant <em>to someone who knew C in general</em>.</p>
</blockquote>
<p>This addition changes the statement from debatable to circuitous. “Code written using C-derived arbitrary constructs is more obvious to someone who knows C than code written with non-C arbitrary constructs”: err, yes obviously. How does that warrant a writeup?</p>
<p>—<a href="http://plasmasturm.org/">Aristotle Pagaltzis</a></p>
</div>2012-08-25T23:09:25Z