Talk:List comprehensions: Difference between revisions

Line 19:
 
Put another way, is the aim of this task to demonstrate how to accomplish a similar end in multiple languages, or is it to filter out languages for which a particular means is not baked into the language's syntax and/or standard? If the latter, why don't we have a task to accomplish the former? And once we were to have the former, why would we need this task, as opposed to identifying the code examples in that task which allow for the more stringent requirements? --[[User:Short Circuit|Short Circuit]] 16:23, 20 April 2009 (UTC)
 
:We have some tasks that are specific to other sections of programming languages - those with explicit pointers, or those with OO features for example. Functional programming languages such as Haskel, ML and OCaml are, in some ways, the new kids on the block and I think it is right to have some tasks expressed from a functional viewpoint as well. The task is to show how some languages explicitly borrow from set-builder notation to form what is called a list comprehension in many of those languages and to show the similarities between the languages syntax and that of set-builder syntax. It is like a task to show how to create a class; some languages might be able to do the same thing with a structure and maybe pointers to functions, but the writer of the example should state that the language designers did not have the idea of a class in mind when they created structures and function pointers. Similarly in a task about goto statements, if asked to use a goto to jump to the end of a function, I would not think it correct to raise an exception that is caught just before the function returns. You could state that it works the same, but it would not be using a goto statement. (P.S. I like the debating on RC, it's civilised) --[[User:Paddy3118|Paddy3118]] 21:07, 20 April 2009 (UTC) :-)
Anonymous user