Talk:Loops/N plus one half: Difference between revisions

 
(2 intermediate revisions by 2 users not shown)
Line 20:
 
The other problem is defining "best". For example, the third COBOL posting uses GO TO. It's really fast, but is it the "best" way of doing it? [[User:Axtens|Axtens]] ([[User talk:Axtens|talk]]) 15:45, 29 May 2013 (UTC)
 
With the (obviously unfair) benefit of hindsight, it's clear (not least from the various sighs and qualifications attached to a number of the solutions that were submitted here) that this is one of those defectively formulated tasks from which something needs to be learned. What went wrong ?
 
:'''The assumptions were (inadvertently of course) too parochial'''
:: The solutions in '''ACL2''', '''Haskell''', '''IDL''', '''J''' and '''R''' all came in with comments to the effect that using 'loops' would constitute a suboptimal, irrelevant or even perverse approach to solving the problem of special cases at the end of series or patterns. "''No one would ever use a loop in IDL to output a vector of numbers''" comments one submission. Other submissions, like those in '''Closure''' and '''Scala''', don't bother with explicit comment. but either quietly submit a more appropriate non-iterative solution to the problem (sometimes in addition to the artificially 'loopy' one), or just ignore the inadvertently parochial formulation, and submit an appropriate (loopless) solution.
:'''The nature of the task was framed too superficially for a Rosetta context'''
::Real Rosetta tasks solve problems. What was needed was a clearer formulation of what the problem actually was. The prominent position (at the start of the task name) of an unreflecting assumption about what the '''solution''' would look like was symptomatic of insufficient clarity about the nature of the '''problem'''.
:As a result the framing of the task slipped away from the core Rosetta goal:
::''"The idea is to present solutions to the same task in '''as many different languages as possible"''''' (see the landing page). This is the heart and value of the Rosetta project, and the "loop" formulation of the problem was an immediate failure in terms of inclusivity, depth, and relevance.
:::#It may well have discouraged users of some languages from submitting
:::#It risked encouraging literal-minded and over-zealous editorial deletions and admonitions.
:And it was inconsistent with a core Rosetta principle:
:[[Rosetta_Code:Add_a_Task#Task_focus|Task focus]]
:'Using a hammer' is not a task. 'Felling a tree' is a task. The formulation here is really in the genre of "''What is the best way of using your hammer to fell a tree ?''" As if the Rosetta audience was specifically imagined as a community of hammer-users rather than as a community of foresters (or forest dwellers) in general.
 
So what do we learn ? Identify the underlying '''problem''' (not the superficial syntactic glitch), and frame a task as the '''solution''' of the deeper problem. If you unreflectingly assume that all languages should naturally be written in hieroglyphics (what else, for heaven's sake ?), you will not get much use from the Rosetta stone that results . If you assume that a special case at the end of a series or pattern must naturally involve a loop, then you will both reduce the submission count, and also risk fruitless bickering and contested deletions at the editorial gates. Users will not benefit. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:17, 19 September 2015 (UTC)
 
== Number of items may not be known ==
 
Most (all?) solutions shown so far rely on the number of items (10) being known. Rexx version 3 does not! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 09:43, 24 January 2015 (UTC)
 
: Indeed, and most languages allow that sequence of characters ('10') to be replaced by another sequence of characters (perhaps 'x') and also provide a substitution mechanism that allow you to specify (in another context) what value to use for your new symbol.
 
:Some people would even claim that this concept of substitution is the basis of computer programming. (Others, more practical, would get on with whatever they feel they need to do.) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 13:17, 24 January 2015 (UTC)
 
:: I don't get your point!--[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 13:36, 24 January 2015 (UTC)
9,655

edits