On 2018-11-08 18:23, welkam wrote:

but you are not against changing for loops to foreach that add almost nothing to code readability and only look better.

Changing to a foreach loop definitely adds to readability and to be able to better understand the code. If you read the "foreach" keyword you know that to a 99% possibility the code that follows is a loop that will iterate a collection from start to end. If you read the keyword "for" you basically know nothing. It can mean iterating a collection, copy some random memory or whatever.

--
/Jacob Carlborg

Reply via email to