When you study programming languages, you learn to distinguish the syntax of a construct from its semantics. The semantics expresses what a construct does, and the syntax describes how it is expressed. The semantics of a for loop is to initialize a variable (or even a set of variables,) to test that variable, and to modify that variable, and to execute a block of code. When these things happen is in the details. The syntax is the definition of the particular sequence of letters and numbers and symbols that denote the construct in a particular language.
If you use a compiler-compiler like yacc, you write the syntax of the language, and then include code fragments at points where a particular chunk of syntax is recognized. While there is usually a production (syntactic rule) for a for loop, nothing much interesting happens there. The action is for the productions that initialize the variable, test it, and modify it. Then, the code fragments generate machine language, an intermediate language, or perhaps the equivalent syntax of another programming language.
The difference between syntax and semantics is demonstrated because you can change the syntax to replace “for” with “do”, say, without changing the code generated (the semantics) at all. In my example a while back, if you by chance wrote a production to recognize “fpr” instead of “for”, for that syntax my second case would be syntactically correct, and my first would be in error.
Now before Lib says that the semantics of a for loop represent its essence, even this varies between languages. Some require you increment or decrement by one, some allow you to increment or decrement by any constant, and some allow any expression. Some require you to initialize the variable, some don’t. And, as I mentioned before, the concept evolved from mathematics and algorithms. If there is an essence of the for loop, it does not seem to have been accessed by anyone.
Now if the essence of a for loop is “that which a thing, if it is to be, cannot not be.” I’m at a loss to figure out what this is. We can have a for loop with no body - a stupid way of adding a value to a variable, but perfectly legal. We can have a for loop where the variable is initialized outside the for loop. We can have one where the test is done in the body of the loop. We can have one where the variable is modified in the body. You can’t have all these things at once, but you can have instances of for loops where each of the vital components is removed in turn, and still have a for loop.
I suppose you still need the word “for” in the header, but saying the essence of a for loop is that the word “for” (or an acceptable misspelling) appears in the header isn’t very satisfying.