Talk:Functional programming/Archive 1

message: Have done initial merge with Nupedia article.  Still needs work, esp. the section "functional programming" needs to be merged into main (new) text. -- Lexor 03:30, 14 Aug 2003 (UTC)

message: The article contrasts Functional Programming to Imperative Programming, yet in the Programming Paradigm article Functional Programming is contrasted by Procedural Programming.  Imperative Programming and Procedural Programming are orthoganal.  This is an inconsistency.
: First of all, this need not be inconsistent. 3 or more concepts can be in contrast with each other. For example, you could contrast 3 political parties against each other. However, in this case, we must first define what distinguishes Procedural and Imperative programming. Only then we can decide whether we should contrast this article with either or both. --Raboof 11:46, 13 Apr 2005 (UTC)
thread_title:  Contrast 

message: [ Note and Question: comparing a mathematical calculation of a program constant with programmatic reading of user input is not a valid comparison between programming lanuages, in my opinion. Your sqrt(2) example could be just as easily optimized in an imperative programming language...
:The problem is that the optimization is safe only if the function call has no side effects.  Although the compiler of an imperative language might know that this is true for the special case of the sqrt() function, it can't know that in general for an arbitrary function, not even in principle; see Rice's theorem.  -- Dominus 3 July 2005 03:03 (UTC)
::I don't think this is true.  Take Java for example.  There is root syntax set that is idempotent e.g. i = 2 + 2 never has side effects.  It cannot.  Given that, it's not hard to evalute recursively that if a body of a method contains only idempotent operations, it is also idempotent and if a method only calls other idempotent methods it is idempotent.  This is actually a real feature (escape analysis) that is being implemented in 1.6 to allow stack allocation of Objects and other VM optimizations. Dubwai 19:15, 10 January 2006 (UTC)
replies: text: Er... I believe that i = 2 + 2 does have side effects: it alters the value assigned to the variable "i". --Allan McInnes (talk) 21:21, 24 March 2006 (UTC)
thread_title: Note added to article by anon user

message: This article could have the potential to be a Featured Article, but I have some concerns about POV. Regardless of whether or not functional programming is actually better than other forms such as imperative, the article needs to increase the number of lines allotted to criticisms. The current layout involves one or two sentences worth of criticism at the beginning, followed by paragraphs about what's wrong with the criticisms. I would suggest clumping the most common/notable criticisms under a "criticisms" section at the end and expanding on them. It might also be good to merge the two "functional languages" sections into one, and expand the history section. -- BRIAN0918  04:10, 4 August 2005 (UTC)
thread_title: NPOV concerns

message: How does functional programming relate to Logic programming? -Chira 10:20, 19 August 2005 (UTC)
replies: text: They're both different paradigms. The concept of referential transparancy features in both in some form. Wouter Lievens 08:49, 11 October 2005 (UTC)
thread_title: Logic Programming

message: This article is very biased towards Haskell and "pure functional" style of funcional programming, which is in fact just a very small and rather extreme position in the funcional programming (a bit like Smalltalk's "pure object oriented" programming in the object oriented programming).
First, defining functional programming by the lack of side effect is wrong in two ways:
* One cannot define something by a lack of a certain feature. It's like claiming that the point of structural programming was not having goto. The point was providing some new control structures (procedures, loops etc.) that only accidentally made goto unnecessary most of the time. Likewise, the functional programming provides some new control structures, primarily the high level (polymorphic) functions and efficient tail recursion, but also macros, continuations, exceptions, parametric modules etc., that make the old imperative features necessary less often.
* Almost all functional languages do have side effect. It seems that the most popular functional languages are all kinds of Lisp (by a very big margin) then MLs, Ruby, and all kinds of semi-functional programming in otherwise imperative languages (like Perl, or Java with inner classes). All with side effects. The "pure functional" programming languages like Haskell are just a very small branch of the functional programming (and in fact most of the concurrent extensions to Haskell do have side effects, so even Haskell isn't 100% pure).
* The pure functional programming misses a lot of the most interesting features of the functional programming. There are no continuations, exceptions, macros etc. in the pure functional world.
The specific examples of the advantages of the (purely) functional programming are also not based in reality:
* The claim that "program optimisation" is a strong point - imperative and impure functional have a much better performance than pure functional languages
* verification - surprisingly, most of the verification research of the real programs (like the proof-carrying code stuff) seems to be operating on assembler level, to get around the difficulty of verifying the big and complex piece of code that the optimizing compiler is. And the model checking is also quite imperative. Am I missing something here ? Are there some real-world verification tools for the functional programs, as I only know the ones that are quite imperative.
OK, that's what I see wrong in the introduction.
I suggest we:
* separate the pure functional stuff somewhere else, and leave only the things common to most of the functional languages here
* neutralize the article
Taw 14:40, 31 January 2006 (UTC)
replies: text: Sounds OK to me, though of course references to pure functional programming and Haskell should be present. I am unconvinced by Java with inner classes being semi-functional programming, most uses of inner classes are either to implement an interface in-line, or so that you can access the enclosing classes members. -- Chris Q 15:08, 31 January 2006 (UTC)
replies: text: Is there really a big enough problem to warrant an NPOV warning? I haven't got a strong enough opinion to remove it, but I still think the article is good in general. -- Chris Q 15:10, 31 January 2006 (UTC)
replies: text: I do feel strongly enough that the NPOV tag is not warranted that I'll remove it.  There are some good suggestions for improvements to be made (and some less good ones: for example, I don't think removing side-effects is, well, a side-effect, but an actual design goal... not the only one, but hardly just a "by the way...").  But these suggestions are just normal editing goals that don't really resemble any neutrality dispute.  I really dislike the use of  as a way to say: "Pay more attention to my edit goal than the others!" rather than as an actual dispute. Lulu of the Lotus-Eaters 18:28, 31 January 2006 (UTC)
replies: text: It needs to be tagged somehow (from what I've seen, it usually takes about 10 times as much time to fix untagged articles ;-) ). It talks about one kind of functional programming as if it was the only existing kind of functional programming. It's either very strong Haskell bias or very strong inaccuracy. Taw 10:14, 1 February 2006 (UTC)
replies: text: Why not just fix it, rather than misuse a template? From what I can see, you've identified an extremely minor focus issue that you are perfectly well able to correct yourself. Lulu of the Lotus-Eaters 11:32, 1 February 2006 (UTC)
thread_title:  Should have less focus on "pure functional" 

message: The article has some other issues in serious need of attention; it variously claims:
*"The strength of a functional paradigm is the removal of side-effects during computation."
**I (and many other functional programmers I know) use functional programming to improve compositionality and to use recursion; side-effects are important, too, but not the only strength.
::How about "...strengths of FP include removal of side-effects, ease of compositionality, emphasis on recursion, ..." ? (sort of like the Monty Python Spanish Inquisition bit :-)) Lulu of the Lotus-Eaters 20:03, 31 January 2006 (UTC)
replies: text: Lazy evaluation does make my life easier! But I agree that the article needs a clearer separation between pure and impure functional languages. However if you talk about functional programming concepts in general you would usually do so from the pure perspective as the impurities are more practical hacks than... uhh... well-founded priciples? —Ruud 18:21, 2 February 2006 (UTC)
thread_title: Other problems

message: what would it take to move this article out of the delisted good articles category and back into the good articles category? Ideogram 06:02, 27 May 2006 (UTC)
thread_title:  delisted good articles 

message: Sort of a fiction we talk about on WP.  You comment, Ideogram:
:So what do you think the solution is?  If you never want to delete stuff that is less imporant, you'll always have a problem with balance.  This is a pretty deep question that applies to all of Wikipedia.  Allan, do you have any input?  Ideogram 04:06, 28 May 2006 (UTC)
replies: text: Maybe you know enough about FP to double the length of the article, but I obviously can't just insert padding if I have nothing to say. Ideogram 05:18, 28 May 2006 (UTC)
replies: text: That's fine of course.  It's not your job versus some other editors'.  We certainly don't want padding for it's own sake; but within reason it's better to let readers know more rather than less (as long as the organization lets them easily skip what they don't care about)... past 40-50k or so, article start to desperately need refactoring into child articles, but we have a long way to go. LotLE×talk 05:24, 28 May 2006 (UTC)

text: I think something that makes monads comprehensible to someone who doesn't know category theory or Haskell would be unique on the web.  I don't know what purity is if it isn't completely disallowing side effects.  The whole subsection labeled Pure functions is really about referential transparency. Ideogram 05:25, 28 May 2006 (UTC)

text: This sounds like a good idea and something I might be able to do besides.  Ideogram 05:25, 28 May 2006 (UTC)

text: The problem I see here is that these topics have their own entries, tail recursion being quite long.  What can we say about them in this article that doesn't belong there? Ideogram 05:25, 28 May 2006 (UTC)

text: Again, I can't contribute the raw information.  I can only advise on the overall balance of what is already there.  Ideogram 05:25, 28 May 2006 (UTC)
thread_title:  The "perfect article" 

message: Ideogram 04:02, 28 May 2006 (UTC)
replies: text: Well, it is an anarchy here.  I ain't a god or a master.  But I'd very much appreciate if you'd eschew deleting any concepts addressed currently, and focus instead on filling in the many gaps remaining in the article. LotLE×talk 04:57, 28 May 2006 (UTC)
replies: text: Umm, again, I don't have the knowledge to fill the gaps.  Maybe you could tell me what you're looking for and I'll try to find a match?  I was thinking more along the lines of improving the general flow and readability.  I don't intend any more major restructuring or deletion. Ideogram 05:08, 28 May 2006 (UTC)

text: Not sure exactly what you're asking about here. But if it's what I think it is, then the locations are publishers addresses (at least the city). It's common in academic papers to include a publishers location/address in book citations. --Allan McInnes (talk) 20:40, 28 May 2006 (UTC)
thread_title:  can I start editing again? 

message: There's a mandarin expression translated as the above, to be interpreted as "the more you help the more work I have to do".  I feel like I've done that here and I'm very embarassed.  Sorry.  Ideogram 07:28, 28 May 2006 (UTC)
thread_title:  more help more work 

message: I deliberately asked about my changes before making them since I thought they might be controversial.  LotLE replied indifferently that he didn't see any difference.  Only after I made my changes did LotLE immediately edit them and come up with some discussion for why his version was better.  And furthermore he starts attacking me by saying I'm trying to make a hyper-pedantic point unrelated to making the article more readable.
The official Wikipedia line is to be inclusive and urges newbies to "be bold".  The reality is far far different.  I have really had just about enough of this.  If something doesn't change I'm likely to dump the whole thing.  Ideogram 07:17, 29 May 2006 (UTC)
thread_title:  good faith (again)