Why are there no big applications written using functional languages?
Because there is no such thing as a big application. There is only bigger or smaller. This is a central tenet of functional programming. “Big application” is a euphemism for “My idea of programming does not scale beyond this point.” You don’t realise how much information you give away when you ask this question.
So can we can stop with the piffle and get on with the interesting and important stuff? Ta.
March 24th, 2010 at 11:59 pm
I already answered this post a month ago. I was not the only one.
Where are the old posts and the comments ? I am a bit puzzled.
March 25th, 2010 at 9:32 am
Hello LBarret,
The original post was accidentally deleted. I pulled it up from google cache and reposted it. Sorry about losing the comments.
March 25th, 2010 at 1:17 pm
I think you are missing the point of the question. The person asking probably isnt interested in getting into a pissing contest about just how big their idea of a big application is. They are probably more concerned that functional languages are too indecipherable to be used on anything but a toy program. If you dont want to answer the question why waste your time insulting them, why not just decline to answer.
March 25th, 2010 at 1:30 pm
Hello Doug,
I completely understand the point of the question. You are misunderstanding my answer. It’s not an attempt to “get into a pissing contest.” Rather, it’s an answer that is completely consistent with the definition of what it means to be functional programming.
Simply put, the very idea of a “big applications” rests on the premise of some threshold that qualifies an application as “big.” The very thesis of functional programming is to eliminate any such barrier. This is right at the essence of what it means to be functional programming.
I am not declining to answer, in as much as it is simply not possible to answer. Not for me, not for anybody. As an uninteresting consequence, the question opens up an insight into the understanding of programming of the person asking it. So uninteresting in fact, that I see no value in pondering on this insight, nor trying to save the idea that there might be a reasonable answer to the question. There isn’t.
Let’s get on with the interesting points. Indeed, “pissing contests” are not that.
March 25th, 2010 at 5:59 pm
Hi Tony,
what you have put in your second para above seems a much better response to the question. I would encourage you to leave out the bit about a) their question being uninteresting and b) them asking it shows that their idea of programming doesnt scale past some point. Which were my two concerns about the original post being an invitation to a “pissing contest”.
March 26th, 2010 at 4:20 am
“Why are there no big applications written using functional languages?”
Tony, I completely agree with you, the question makes no sense. I would also add that the concept of “application” could have different meaning in context of functional programming. And “write” is also different in functional languages and can not be used the same way, with the same meaning. So the original question is really meaningless and stupid!
March 26th, 2010 at 12:44 pm
Okay well in that case, can you name some ‘big’ applications written in functional languages in terms of number of users/sales, or financial value? The two biggest I can think of are Facebook’s chat engine (Erlang), and GHC itself.
March 26th, 2010 at 1:18 pm
Hello Jameson,
I would like to answer your question, however, at this stage I cannot. I need to know what a functional language is. Specifically, what it means for a language to be functional. Perhaps you can tell me. Hopefully then I can answer your question. Thanks in advance.
PS: I might add that I recently gave a presentation titled, “What Does Functional Programming Mean?”. Here are the slides. There is a subtle and important distinction to be made between the two questions (one that I don’t know the answer to and another that I am confident enough to give a presentation).
March 26th, 2010 at 3:04 pm
Fine, for now, in Haskell, Erlang, Lisp, F#, Scala, or ML/Caml/OCaml, and associated derivations of these languages
March 26th, 2010 at 3:48 pm
Hello Jameson,
I have written a few applications in these languages, but I don’t understand what this has to do with the central thesis of functional programming, which is what is under discussion.
Consider for example, that Haskell is a significantly superior imperative programming language to Java. A discussion on the existence or non-existence of applications written using Haskell says nothing about imperative programming.
March 26th, 2010 at 4:52 pm
“Large program” is, in this respect, much like “high level language”.
Having said that, there is one respect in which it’s a somewhat useful metric. As programs (or, increasingly, product lines) get larger, more tools tend to be required to aid in the maintenance of them. The lack of a sufficiently large program may indicate the inadequacy (or non-existence) of those tools.
Of course, “large program” is relative to the language. I remember a paper in the 80s which described a superlinear analysis for Prolog which claimed that its complexity wasn’t a problem because it was fast “even on large 1000-line programs”.
March 26th, 2010 at 6:43 pm
Tony, you said you couldn’t answer my question because you didn’t know what a “functional language” was. I gave you a list of functional languages. Can you please answer my question? I am not discussing the “central thesis of functional programming.” I asked a pretty plain, well-defined question.
March 26th, 2010 at 7:00 pm
Hi Jameson,
I deliberately avoided your question. I did this because you have (inadvertently?) avoided my question so I assumed you no longer considered it important. It seems you do consider it important, so I will require you to answer my question before continuing.
When I ask what a functional language is, I am not asking for examples that you might consider functional. I am asking for the essential properties of a language that make it functional. By essential here, I mean that the absence of one or more of these properties disqualifies a language as functional. This is really important before continuing.
This way, I can determine if I do or do not agree with your list by the same process that I assume you have applied. More specifically, I can also apply this test to any language and determine if it is or is not functional. I would like the capability to apply a test (in your absence) to make these determinations.
I hope you agree with me that a consistent answer to this question is required before continuing and trust that I am not being deliberately obtuse for no important reason.
March 26th, 2010 at 11:23 pm
@Jameson
Although I don’t want to distract you from answering Tony’s question, it is indeed interesting to ask what a “big” application is.
For one, it could be seen as the complexity of the system which is written in this language.
You mentioned Erlang. As far as I understood Erlang is used to program telephone switches. Well the resulting “program” may not be “big”, but the system which is constructed with this “program” and therefore with Erlang is BIG. At least I consider a telephone network and its requirements in reliability big.
Beside that, Erlang was used for a Jabber server, a messaging server, two database engines and a 3D modeler. All of that are serious applications with some good amount of complexity, related to algorithms, code structures, computations or data throughput.
And that was only Erlang and its famous apps.
But perhaps what you imagine is an application of an ERP size, where 100 or more developers are involved in producing one “big” software product?
“Big” in this sense is more about the size of project teams and the maintainability and lifecycle of a product.
Until now the decisions for programming languages are more driven by market aspects and business decisions than by the question if it is “functional” or not.
It is about what developers the market offers and what problems the industry has to solve, about support contracts, standardisations and, well, about hype.
I expect to see some changes in the (near?) future here, as the call for functional approaches in programming will become louder in the sight of more and more parallelism, need for maintainability, abstraction in expressing the business a.s.o.
But programs in this area will also be more modularised, consisting of smaller parts, interacting with one another. The monolith will not work.
So what is the “big” application then? The runtime cloud? It will blur more and more.
Just my 2ct
March 27th, 2010 at 10:01 am
“When I ask what a functional language is, I am not asking for examples that you might consider functional. I am asking for the essential properties of a language that make it functional. By essential here, I mean that the absence of one or more of these properties disqualifies a language as functional. This is really important before continuing.”
That’s fine, but I revised my question. I gave you some parameters. I was curious if you knew of any applications that fit the bill in those languages. And you’re dancing around my question to seem intellectual. Det gave a nice note with Erlang, but you’ve got your head up your ass. I’m not asking for some bullshit theoretical or intellectual exercise. I’m just asking for some examples of applications that are big (in terms of the parameters I gave) written in those languages.
March 27th, 2010 at 10:46 am
Hi Jameson,
I was expecting the following insult. This is what usually follows when being cornered into answering a question where that answer would expose the inadvertent dishonesty of the question. It is sometimes called “cognitive dissonance.” I don’t wish to get bogged down on this issue; rather I’d like to revert to the question, the original one that I asked.
I would like to know what you think a functional programming language is. It’s really that simple. I’m not trying to sound like anything more than a curious person. Please try to answer that question; don’t answer a different one. I didn’t ask “Please provide me examples of what you think are functional programming languages.”
This discussion is not about Haskell or Erlang. It’s about functional programming. I’d like to discuss this topic. Apparently, according to you, some languages can be described as “functional programming languages”. That’s great! So tell me how.
March 27th, 2010 at 7:17 pm
What the fuck are you talking about, the “inadvertent dishonesty of the question?” I’m not trying to box you into a corner and prove you wrong or something or make some big philosophical point.
I’m literally looking for some examples of large codebases, large userbases, with applications written in some of those applications. I actually kind of want to look at the codebases where possible and see what they do to structure those sorts of applications.
My question is clear and doesn’t serve any sort of dishonest purpose. Please just answer it already
March 27th, 2010 at 9:16 pm
Hello Jameson,
You seem to have misinterpreted what I said. Never mind.
Speaking of “just answering it already”, are you interested in answering the original question?
March 27th, 2010 at 11:57 pm
A definition of a functional language which would work in the context of this questions is simply a language which encourages a functional programming style. Many languages does this to a certain degree, including for example Python, but not to such an extent that it would be common to write a program in a largely functional style. Haskell, Erlang, Lisp, F#, Scala and ML/Caml/OCaml are examples of languages that encourages a more functional style than would be usual with for example Python or C#.
What do I mean by a a language that encourages a functional style? A language which encourage widespread use of list comprehensions, recursion, higher-order functions and other techniques commonly used in functional programming.
There is of course no strict definition of a big application, but I still think most people would agree that an application that takes multiple developers multiple years to develop would count as a big application.
My point is that I think that when people ask this question, they are likely to think of definitions similar to these when they say “big” and “functional”.
March 28th, 2010 at 9:50 am
Tony,
Why the fuck do you care what I think a functional language is? You’re just making trying to trap me with a bullshit question. I don’t give a shit about “tenets of functional programming” or any of that. I’m not trying to have some sort of fucking debate or argument. You seem to use FP a lot, so I was asking for a list of some applications that are large by some metrics I gave.
Det gave me a nice response specific to Erlang so I’m curious about the other languages. Why are you being so fucking difficult?
March 28th, 2010 at 1:18 pm
Jameson,
Please calm down. It’s just a question. I just happen to find it more interesting.
March 30th, 2010 at 8:24 am
Tony, what did you mean by “functional language” when you used it in this Haskell cafe post?
http://www.mail-archive.com/haskell-cafe@haskell.org/msg23101.html
Apparently, according to you, some languages can be described as “functional languages”. That’s great! So tell me how. I would like to know what you think a functional programming language is. It’s really that simple. I’m not trying to sound like anything more than a curious person. Please try to answer that question; don’t answer a different one. I hope you agree with me that a consistent answer to this question is required before continuing and trust that I am not being deliberately obtuse for no important reason.
March 30th, 2010 at 9:15 am
Trax2, a functional language in that context is one that does not make things difficult for the user to write functions.
March 30th, 2010 at 3:50 pm
” a functional language in that context is one that does not make things difficult for the user to write functions.”
According to your definition, majority of languages can be called functional language.
Because one can easily squeeze in a language merely by claiming that as a user he/she finds it easy to write functions using that language.
Isn’t ease/difficulty subjective??
Aren’t there better metrics than nonsense like ease and difficulty of writing functions?
Are you falling into your own trap Tony?
March 30th, 2010 at 6:50 pm
Murkha,
You’re wrong. “According to your definition, majority of languages can be called functional language.” This is false. Try it.
There is no trap; only that which is real.
March 31st, 2010 at 7:47 am
Jesus G?D. Is this really what you do all day? Wow.
If a program written in Haskell can be compiled to C with GHC, is the resulting C program functional, or not functional? And a follow-up: could the resulting C program be written from scratch by a human, without aid from GHC? And finally: is C a functional programming language?
PS Each language listed by Jameson on 26-Mar makes its own self-proclamations about being functional. I have to think that’s why he chose them. We are in violent agreement on the meaning of “big”, that much is certain. However, the moment Jameson gave you reasonable metrics for “big”, you moved the goalpost - or more accurately, you painted it with some camouflage paint. So — (and not that it matters) what I think is that either a) you are being obtuse for no apparent reason, or b) you disagree with the stated claims of those advocating the languages Jameson listed.
FWIW I think it’s (a), and I do actually know the reason, though it’s not worth wasting any more time over. Good luck and enjoy your 15 minutes.
March 31st, 2010 at 6:14 pm
funkshunal,
Your questions are incoherent. Please revise.
April 1st, 2010 at 1:49 am
Tony Morris, I think it would have been more useful to reply to Jameson’s post with this big ol’ list of big functional language programming code users, instead of going on ad nauseum about the meaning of bigness
http://wiki.alu.org/Industry%20Application
April 1st, 2010 at 9:12 am
mordaunt0,
Thank you for your advice, despite my not understanding it.
I asked a question about functional programming languages. I didn’t “going on ad nauseum about the meaning of bigness.” I also refused to answer Jameson’s question for two reasons:
1) I have explored the question in detail before and is not a very promising question. Even after you have answered it, what useful inferences can be determined? Not many.
2) I have no obligation to answer every question proposed. This blog is perhaps unlike others you might be used to. I have no motivation to answer questions, except to help others by my own compulsion. Unlike other blogs, you might notice that there are no advertisements on this web page. I don’t think answering Jameson’s question is helpful. It’s that simple.
I have also been reminded that I was taking mild-altering medication at the time I wrote those comments (I’m not any longer), though I’m not sure that changes anything.
It was just a question. I reject the sense of entitlement of others for me to be obliged to answer an arbitrary question.
April 1st, 2010 at 11:10 am
@tony morris
Well I thought a short answer to his question would have been a more productive use of time than the giant thread that was spawned by insisting on not wanting to answer it
But hey, it’s your time
April 1st, 2010 at 2:02 pm
mordaunt0,
Perhaps. In light of a misunderstanding between parties, the insults lessen the chance of progress. I resign pretty early on when this happens, but I also maintain a sense of optimism, perhaps to my own detriment, since there are cases of a turn-around. Thanks for the tips.
April 7th, 2010 at 8:50 pm
Interesting flow here …
Well, I think if someone is not interested in fundamental or even philosophical debates, he’s wrong here. At least this is Tony’s blog, and it is somehow his style.
The way he answered or not-answered here is in my eyes a kind of Zen experience. One must get into it, or it will not be fun but frustration. It is somehow a teaching play.
If you feel as if he did not understand you, ponder why. If you do not understand him, meditate about the statements or responses. It scratches on your current paradigms.
If you’re open to it, it could take you beyond a border. At least that is how I felt about his and others comments on the Scala list some time ago.
So no reason to curse and moan. Play the game.
Tony, you wrote: “Trax2, a functional language in that context is one that does not make things difficult for the user to write functions.”
So I suppose the open questions here are:
- What are functions?
(answer may be necessary for)
- What makes them difficult to write (in language X)?
April 8th, 2010 at 8:58 am
Hello Det,
Taken directly from FOLDOC, a function is:
The answer to your second question can be found through experimentation. Functional Java and Scalaz are two such experiments.
I do not apologise for not answering arbitrary (and in this case, overwhelmingly uninteresting) questions and the entitlement is quite repulsive.
April 14th, 2010 at 3:24 am
IMO, even so called functional programming languages make it harder than necessary to “manipulate” functions due to artificial lines drawn between data structures and functions.
However, the most fundamental problem with functions in algorithmic context is the question of identity, if we say “f: D-> C” we implicitly assume that “equal” objects have equal function values. However, “identity” is a very elusive beast: it can mean different things based on the assumed equivalence relation and may be even computationally intractable.
April 14th, 2010 at 12:57 pm
Christian,
In the language Haskell, given the data type:
then A, B and C are regular functions. I don’t know what else you might mean by “artificial lines.” Languages like Scala certainly get this messed up (in more ways than one), but this is not by virtue of it being (or not being or somewhere in between) “functional.”
April 17th, 2010 at 11:04 am
I meant a much deeper issue than that.
There are different representation of functions: you can represent functions by arrays, maps, and b algorithmically, etc. When you specify your specific implementation e.g. in Haskell, then you fix a certain implementation, which will determine the complexity and ease of use of *updating* the specified data structures.
In the most common case you typically want to have some local functions to store some temporary data and then throw it away after your algorithm finished. This data is typically a function from some domain to a co-domain, but you will always need ad-hoc methods to represent your function as a data-structure, depending on the actual representation of the domain. Defining such temporary mappings can be quite tricky especially in a language like Haskell that does not support physical equality per/default.
OTOH *allowing* physical equality (that you have basically for free e.g. in Scala) opens another Pandora box, with its own set of big problems.
These problems arise even in other non-pure functional languages like ocaml. Pure languages OTOH require additional mind-bending gymnastics to cope with circular data-structures like directed graphs in a computationally efficient manner: you either go the monad way (which is practically giving up, IMO) or start using zippers and all kinds of other “really clever” tricks…
April 17th, 2010 at 11:38 am
Christian,
Haskell allows you to abstract on a type constructor, thereby not forcing you to necessarily fix on a specific implementation/complexity. OCaml does not allow this. I truly don’t understand why using zippers might be “mind-bending” or “gymnastics” to solved directed-graph algorithms.
April 17th, 2010 at 5:58 pm
What do you mean by “abstracting over type constructor”?
April 18th, 2010 at 9:37 am
Array and Map are type constructors. Haskell (and Scala) allows you to be polymorphic on these values. It’s also called higher-kinded polymorphism.