Talk:Loops/For with a specified step: Difference between revisions

→‎"useless" examples?: what’s a for-loop?
(→‎"useless" examples?: Who decides ? How are decisions of better quality produced ?)
(→‎"useless" examples?: what’s a for-loop?)
Line 19:
::::: being unusually opinionated and incurious about procedure seems unlikely to be an adequate qualification :-)
::::: Prior discussion always produces a higher quality of decision, and wastes less time, than the instant gratification of isolated impulse [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 13:21, 3 February 2021 (UTC)
::: I reckon <tt>for</tt>-loops are those listed under [[Loops/For]]. This task requires a ''<tt>for</tt>-loop'' to be used. If the code example used ''here'' uses a language construct that is not shown at [[Loops/For]], I understand it is not a <tt>for</tt>-loop.
::: I’ve deleted the Delphi example, because it’s just a semantically equivalent <tt>while</tt>-loop. You will find the used language construct demonstrated at [[Loops/While]], but not in [[Loops/For]], hence it’s not a <tt>for</tt>-loop. This requirement, ''use <tt>for</tt> loops'', already existed ''before'' I edited the page.
::: I have to make one concession though: Deleting the Axe <tt>for</tt> loop was impetuous. It’s not normal a control variable can be altered ''inside'' a <tt>for</tt>-loop body. In Pascal, for instance, it is illegal to tamper with the counting variable of a <tt>for</tt>-loop. I probably just read the first sentence “Axe does not support a step size other than 1” and then threw it out.
::: I haven’t deleted anything from Dragon. I assume you meant E. The [[{{ARTICLEPAGENAME}}#E|E section]] still contains code for a custom enumerator (<tt>stepRange</tt>). The semantically equivalent <tt>while</tt>-loop, though, is unnecessary.
::: My intentions were to ''qualify'' the task requirements, not ''alter'' them. It’s difficult to phrase: I wanted to still permit examples like C, where it is just idiomatic, “normal” to write a conditional expression <tt>i < 10</tt> and statement <tt>i += 2</tt>, because <tt>for</tt>-loops with a step size of <tt>1</tt> look just the same.
::: [[User:Root|Root]] ([[User talk:Root|talk]]) 13:37, 3 February 2021 (UTC)
149

edits