Talk:Sum of squares: Difference between revisions

Function composition
(Agreed, this is not about composition.)
(Function composition)
 
(One intermediate revision by one other user not shown)
Line 34:
::::The [http://en.wikipedia.org/wiki/Function_composition_%28computer_science%29 wikipedia article] uses a crappy [[C]] example that misses the point, but includes a bunch of good references. Composition in [[Scheme]] is covered in SICP. --[[User:IanOsgood|IanOsgood]] 10:33, 29 January 2008 (MST)
:::::Yes, Ian. Function composition occurs when a function is created by specifying a relationship among other functions. --[[User:TBH|TBH]] 10:36, 29 January 2008 (MST)
:::::Neat. So any language capable of anonymous functions and function pointers could do it. --[[User:Short Circuit|Short Circuit]] 19:47, 29 January 2008 (MST)
::::Because I agree with the emphasis on clarity, I think this task should continue to stand as sum-of-squares. The recent addition of an IDL solution was very satisfying, and would not have shown me what it did if the mere summation task had replaced this one. Also, that IDL solution does not involve function composition. --[[User:TBH|TBH]] 10:36, 29 January 2008 (MST)
:::::Three examples (using the first J example) on this page are almost identical to their sum and product examples. They don't seem different enough to get a whole other task. And, goiing back to the original discussion, if three out of four don't involve function composition then how does this task "let us see how basic function composition occurs"? --[[User:Mwn3d|Mwn3d]] 11:45, 29 January 2008 (MST)
::::::I retracted that claim (on 14:37, 28 January 2008). My current claim is that this task is easily understood and allows us to see features in languages that we do not see with the accomplishment of mere summation. --[[User:TBH|TBH]] 12:21, 29 January 2008 (MST)
:Perhaps this turns on a choice of taxonomy. Is it better to focus on tasks, implementations, or some intertwining of the two? This task was plainly added to the site in order to demonstrate a language feature, and as other languages fill this in that demonstration will become buried. That suggests that it should be handled differently. However, it seems to me that feature-type tasks tend to remove the comparative aspect by excluding languages that do not support a specific style of implementation.
:Only now do I see the emphasis on role in this recommendation: "Clarity is key; The more clear the *role* of a task, the easier it is for [us] to keep code accurate and pages maintained."
:So, while I think the task is clear and the comparison among languages here is interesting, I recognize that here it is not clear what the role of the task is. --[[User:TBH|TBH]] 13:01, 29 January 2008 (MST)
::So let me pose a question. Can a task be devised whose explicit purpose is to clearly demonstrate the semantics of [[Function Composition]], particularly in a way that is reasonably clear to people with a non-CS background?-[[User:Short Circuit|Short Circuit]] 19:47, 29 January 2008 (MST)