layout: post title: “For an experienced programmer to read…” date: 2021-12-11 categories: post code

Signature

Несомненно, самым типичным применением циклов for являются счетные итеративные вычисления:

for ($i = 1; $i <= 10; $i++) {  # Отсчет от 1 до 10
  print "I can count to $i!\n";
}

Цитирую автора книги “Learning Perl” (page 186, Chapter 10: More Control Structures) :

All three parts are together at the top of the loop so that it’s easy for an experienced programmer to read that first line and say, “Ah, it’s a loop that counts $i from 1 to 10.”

Радуюсь этому! Нашёл подтверждение от автора того, что я an experienced programmer !

book