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

 
(13 intermediate revisions by 5 users not shown)
Line 28:
::: Deletion '''very rarely''' adds value.
::: You may find a contribution 'useless' for your purposes, but we really don't need to know that, and it's '''not''' up to you to make that decision on behalf of others.
::: 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. [[User:Hout|Hout]]At ([[User talk:Hout|talk]]) 18:31worst, 3you Februarymay 2021learn something. (UTC)
::: 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)
:::::It seems you don't understand the point of the site. For each language, show how it's done. For the reader interested in language A, it doesn't matter that something is written for languages B, C... Z. Besides, it's not always a while loop, as I have already explained. [[User:Bastet|Bastet]] ([[User talk:Bastet|talk]]) 08:05, 4 February 2021 (UTC)
:::: Good grief ... "''This is a wiki, so ...''" "''In consequence I ...''" ''"I just couldn't ...''" ?
:::: Are you serious ? Forgive me, but this is not Wikipedia, the software used is utterly irrelevant, and to protect yourself from a whirlpool of monologue, and the site from an episode of vandalism, you do need to consult and discuss before you rush blindly and self-righteously into deletions. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 08:51, 4 February 2021 (UTC)
: I'm throwing my hat into the ring for reversing these changes. If I'm learning a new language and come to Rosetta Code to see how it does a for loop, it's far more useful to see a demonstration of that language's nearest equivalent than it is to see it's been omitted. Furthermore, there is more nuance to many language's iteration constructs than simply considering them to either be generators or clones of one particular language's <code>while</code> and <code>for</code> loops. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 10:02, 4 February 2021 (UTC)
:: Seconded. More value was '''removed''' than added, and prior discussion would have protected not only Rosetta value, but also contributor time. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 10:40, 4 February 2021 (UTC)
 
:: +1 from me too. If a language has the feature then it should be shown; (we might argue about if other non-feature implementations may also be shown). If a language misses the feature then showing that languages idiomatic replacement, especially for basic constructs, should be encouraged. "Esoteric" languages, for example, may be specifically esoteric in their methods of implementing common constructs.
:: Entrys can say msomething like "we don't have that construct but...".
:: Some tasks specifically state that X should be used. Not showing X may always cause issues so starting with an explanation may be best, but gives no guarantee. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:31, 4 February 2021 (UTC)
 
::+1 as well. For some languages, the requirement just doesn't make sense. For esoteric languages such as brainf*ck of course, but also for more traditional ones: a for loop in assembly? Nope, it's a jump. I can imagine that a few other simplistic languages have goto but no loop. And of course, a range/seq/iterator is yet another approach. Often several are possible (Ruby comes to mind). Rosetta Code can't rigid. [[User:Bastet|Bastet]] ([[User talk:Bastet|talk]]) 14:06, 4 February 2021 (UTC)
 
:: Done. This thread has already wasted more time than the "not liked by Root" did collectively over the last decade. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 17:07, 4 February 2021 (UTC)
7,794

edits