Explicit or implicit looping?
<p>Why or when is "explicit" preferred when implicit solutions often are more readable and less code? It says "explicit is better than implicit" when for example an implicit loop is better than an explicit loop isn't it? </p>

<pre><code>for every in all:
  every.updated = True
</code></pre>

<p>The above looks implicit to me and better than an explicit counter since a counter is another thing that can go wrong and why not leave to the compiler or other environment instead of requirement an explicit counter variable:</p>

<pre><code>  for(int i=0, i&lt;a.length, i++)
...
</code></pre>

<p>And there are languages where all looping is "implicit" - what does it mean and when is it preferred? And not explicitly setting a value to <code>null</code>or <code>None</code> or likewise seems better to me and I want to rewrite code when I "solve" a requirement by explicitly setting <code>return null</code> or <code>String name = null</code> since I think being explicit about what should be null and None should have a more clear solution such as only use a variable if it's needed and if I write return null somewhere I'm probably doing it wrong. When I was writing Java I found myself writing <code>return null</code> and declaring values as null at some places and I didn't like it and could rewrite it even though the case where I put <code>return null</code> was reached only in case of error. </p>

<p>I asked the guru at work whether we ever should declare a variable to null, isn't defaults much better?</p>

<p>I'd be glad to know your thoughts about this. An example where it <em>is</em> better to be explicit I can think of is declaring a list and explicitly declaring what type is in the list is better than just a list of objects e.g. it's preferred to declare <code>ArrayList&lt;ArrayList&gt;</code> instead of just an ArrayList if we know that it's a list of lists. </p>
