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

→‎"useless" examples?: proposal to _widen_ task requirements to “demonstrate _any_ _kind_ _of_ loop”
(→‎"useless" examples?: proposal to _widen_ task requirements to “demonstrate _any_ _kind_ _of_ loop”)
Line 30:
::: If you genuinely think that you may have spotted one of the '''very''' rare cases where a deletion could somehow add significant value, and that others have somehow missed what you think you can see, then open that discussion, and see what consensus emerges. At worst, you may learn something.
::: Don't execute the prisoner first, and then consult the court afterwards. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:31, 3 February 2021 (UTC)
:::: [[User:PureFox|PureFox]]: Giving languages a chance to explain that a task can’t be implemented exactly as required isn’t the problem, but we gotta set ''some'' limit: Every Turing complete language can achieve any task. In this case though, it just leads to unnecessary repetition, because [https://en.wikipedia.org/wiki/For_loop#Equivalence_with_while-loops transforming <tt>for</tt>-loops to <tt>while</tt>-loops isn’t “sorcery”]. I just prefer to write in the task’s introduction “no <tt>while</tt> loops”, so ''this'' doesn’t ''bloat'' the article, you know.
:::: [[User:Bastet|Bastet]]: Huh. Yes, I wanted to exclude poorly scalable solutions. However, my wording says “''custom'' enumerator”. As far as I understand the [[{{ARTICLEPAGENAME}}#R|<tt>seq</tt> function used in R]] is part of the language, right? It’s not a ''custom'' addition, [[Loops/Wrong ranges#R|it’s already there]], so it’s an idiomatically valid solution.
:::: [[User:Hout|Hout]]: This is a Wiki, so “shoot first, ask questions later” is OK since everything is in the history, we ''can'' “revive” earlier revisions. Wikipedia advertises this as [https://en.wikipedia.org/wiki/Wikipedia:Be_bold “Be bold!”]
:::: Yeah, well, maybe this is one of those “rare” occasions deleting some content is warranted. Can you ''actually'' argue ''for'' repeating ''umpteen'' times “a <tt>for</tt>-loop can be rewritten as a <tt>while</tt> loop <nowiki><</nowiki>code example>” significantly ''increases'' the value? It rather improves usability to ''omit'' such information. If you can make a good point though, I suggest to deliberately ''widen'' the task’s requirements to “demonstrate ''any kind of'' loop with a specified step width”, so this kind of discussion never pops up again. [[Special: PermaLink/322251|On February 2]] I read “Demonstrate a for-loop […]” and I just couldn’t (and still can’t) subsume [[Loops/While|''<tt>while</tt> loops'']] under the term “[[Loops/For|for-loop]]”, in consequence I deleted those implementations.
:::: [[User:Root|Root]] ([[User talk:Root|talk]]) 07:15, 4 February 2021 (UTC)
149

edits