To play devil's advocate for a minute: Nearly all useful, reusable software today is written in a mostly or entirely imperative language. This is despite the fact that functional programming has been around for at least 20-30 years. So, my basic question is, if functional programming is so much better, why isn't more software written in a functional language? Or put another way, why are there so many blog posts promo…
“Mostly functional” programming does not work
21–30 of 58 posts
Re: “Mostly functional” programming does not work
#22Re: “Mostly functional” programming does not work
#23The author needs to be less aggressive in the accusations. This current trend which supposedly "doesn't work" actually runs the vast majority of the modern web consistently and reliably. Placing onerous restrictions on what someone is permitted to do in order to satisfy some formal abstract programming model - that is the thing that really doesn't work too well. This makes arbitrary programming arbitrarily difficult:…
You need to better learn what you are talking about. Passing data by pointer is perfectly allowable in functional programming, how do you imagine passing something by pointer has side effects? Data.ByteString is basically a pointer to a byte array, and it's one of the most common datastructures in Haskell. Even more importantly, the optimizations the Haskell VM is allowed to do because of the immutability and purity…
I was really bashing the single-paradigm purist approach in general. It's much too rigid and difficult for anyone who isn't a card carrying mensa member.
Re: “Mostly functional” programming does not work
#24To play devil's advocate for a minute: Nearly all useful, reusable software today is written in a mostly or entirely imperative language. This is despite the fact that functional programming has been around for at least 20-30 years. So, my basic question is, if functional programming is so much better, why isn't more software written in a functional language? Or put another way, why are there so many blog posts promo…
Learning when it's useful to use state, and restricting side effects to those parts of the program that require it, is a good skill to have. Now, pure functional languages may have had a slow adoption, but they are a good way to learn the paradigm that can be translated to other environments.
Also, if you think FP hasn't produced results you haven't been paying attention, or you don't program neither web applications nor database APIs. Declarative libraries like jQuery selectors and LINQ have spread like fire, and any programmer of complex asynchronous applications should take a look at Reactive Programming (which represent state changes in a functional style with the Streams and Futures abstractions) and Agent-based Models (which encapsulates them through message passing).
Re: “Mostly functional” programming does not work
#25The author needs to be less aggressive in the accusations. This current trend which supposedly "doesn't work" actually runs the vast majority of the modern web consistently and reliably. Placing onerous restrictions on what someone is permitted to do in order to satisfy some formal abstract programming model - that is the thing that really doesn't work too well. This makes arbitrary programming arbitrarily difficult:…
Which functional language prevents you from passing buffers by reference? Edit: I see there are quite a few. Please tell me about one :)
Re: “Mostly functional” programming does not work
#26To play devil's advocate for a minute: Nearly all useful, reusable software today is written in a mostly or entirely imperative language. This is despite the fact that functional programming has been around for at least 20-30 years. So, my basic question is, if functional programming is so much better, why isn't more software written in a functional language? Or put another way, why are there so many blog posts promo…
After reading the article I tend to agree. Just this excerpt seems to confirm: Pure functional programming is programming with mathematical functions. ... Calling a function with the same arguments will return the same result every time. That leaves a whole lot of other functions, the non-mathematical ones, the real-life ones where you read files or I/O or user input out of the "Pure" definition, if I understand it c…
http://chris-taylor.github.io/blog/2013/02/09/io-is-not-a-si...
Re: “Mostly functional” programming does not work
#27using(var file = File.Open(path)) { _someField = file; }
..and then use _someField in another method.
It's not so much a problem with understanding closures, but of the limitations of IDisposable.
Re: “Mostly functional” programming does not work
#28To play devil's advocate for a minute: Nearly all useful, reusable software today is written in a mostly or entirely imperative language. This is despite the fact that functional programming has been around for at least 20-30 years. So, my basic question is, if functional programming is so much better, why isn't more software written in a functional language? Or put another way, why are there so many blog posts promo…
Because (1) honesty the “industry” programming is in the stagnation. Otherwise the boring Java♯'d run on Martin-Löf type theory; (2) it may require more brain; (3) we all learn imperative programming first.
(And of course this reasoning is ignoring one aspect: we (mostly) don't want to write bug-free software. Who would pay for support?)
Re: “Mostly functional” programming does not work
#29Earlier quoted context omitted.
Which functional language prevents you from passing buffers by reference? Edit: I see there are quite a few. Please tell me about one :)
Alright ... I didn't mean this to be confusing ... here I'll remove that --- I was referring the whole class of languages which are more driven by purist theory than by practical need. There's quite a few that only support pass-by-value intentionally
Re: “Mostly functional” programming does not work
#30To play devil's advocate for a minute: Nearly all useful, reusable software today is written in a mostly or entirely imperative language. This is despite the fact that functional programming has been around for at least 20-30 years. So, my basic question is, if functional programming is so much better, why isn't more software written in a functional language? Or put another way, why are there so many blog posts promo…
After reading the article I tend to agree. Just this excerpt seems to confirm: Pure functional programming is programming with mathematical functions. ... Calling a function with the same arguments will return the same result every time. That leaves a whole lot of other functions, the non-mathematical ones, the real-life ones where you read files or I/O or user input out of the "Pure" definition, if I understand it c…
You're right in thinking that software with no side effects at all wouldn't be very useful.