Earlier quoted context omitted.
I don't know the OP's examples, but I think he is saying something subtly different: that he took (his own) low-end crappy OO code and converted it to high-end elegant OO code, using the insight gained from how he would have written it as FP.
I didn't get that from the article, but they aren't explicit about it.
A Year of Functional Programming
71–80 of 172 posts
Re: A Year of Functional Programming
#72So to 68002 he had nine and a half or ten, here the article it's enough for me— even I'm interested in FP, but too old.
Re: A Year of Functional Programming
#73Re: A Year of Functional Programming
#74I used to like functional programming. Now I think that it's -- more often than not -- a solution in search of a problem. I can understand some of the things FP gets you (although those come at a cost, which I'll get to later); I'm just not so sure these are the things we need, or that FP is the best solution for them. One is code reuse: yes FP code is definitely more reusable. The problem is that the kind of code it…
The lack of magically bug-free, FP OSs, drivers, control software, and large applications, shows that even the biggest supposed benefits of languages like Haskell, are yet to be demonstrated in the real world. I've been reading religious advocacy of FP for almost 15 years now and yet there still don't seem to be many non-trivial apps written in any of these languages. Certainly many individual features of FP have bee…
Foursquare uses Scala extensively. LinkedIn is using Scala extensively for its new projects. The commercial and successful use cases for Scala are widespread at this point. For Haskell and OCaml it's going to take a while.
Re: A Year of Functional Programming
#75Earlier quoted context omitted.
The lack of magically bug-free, FP OSs, drivers, control software, and large applications, shows that even the biggest supposed benefits of languages like Haskell, are yet to be demonstrated in the real world. I've been reading religious advocacy of FP for almost 15 years now and yet there still don't seem to be many non-trivial apps written in any of these languages. Certainly many individual features of FP have bee…
They exist, but it's super spotty. HN is written in an FP language for example. One of the airline reservation systems is written in some kind of FP. Reddit was written in a Lisp originally. But like many major FP projects, ended up being rewritten in a more common language. I used to work at a place that had hundreds of thousands of lines of CL code that was all rewritten in Perl and was on its way to getting rewrit…
You are probably thinking of ITA and their Orbitz service, using Franz Common Lisp. That is not really a FP language, but a good feather in the hat for Lisp nonetheless.
Re: A Year of Functional Programming
#76Earlier quoted context omitted.
They exist, but it's super spotty. HN is written in an FP language for example. One of the airline reservation systems is written in some kind of FP. Reddit was written in a Lisp originally. But like many major FP projects, ended up being rewritten in a more common language. I used to work at a place that had hundreds of thousands of lines of CL code that was all rewritten in Perl and was on its way to getting rewrit…
> One of the airline reservation systems is written in some kind of FP. You are probably thinking of ITA and their Orbitz service, using Franz Common Lisp. That is not really a FP language, but a good feather in the hat for Lisp nonetheless.
Re: A Year of Functional Programming
#77Would you recommend starting with Scala before Haskell if one want to learn FP?
No. Actually it would be easier to learn Haskell without knowing any imperative language at all. For me Scala also was "gateway drug to Haskell" and after using Haskell for some time I got some good FP habits which made my Scala/JS/whatever code better.
Re: A Year of Functional Programming
#78It's not that I don't think that programming in a functional style isn't a good idea , it's just that the discussions about functional programming and the languages people use to implement its style so often suggest: If you use language 'x', then using mutation is wrong. and recently, I've been thinking about the practically important but socially awkward question: What language is best for implementing mutable state…
Re: A Year of Functional Programming
#79I used to like functional programming. Now I think that it's -- more often than not -- a solution in search of a problem. I can understand some of the things FP gets you (although those come at a cost, which I'll get to later); I'm just not so sure these are the things we need, or that FP is the best solution for them. One is code reuse: yes FP code is definitely more reusable. The problem is that the kind of code it…
"Haskell discounts the very useful choice of reasoning about your code after it runs, favoring, instead, all-upfront reasoning, often at the expense of facilitating the former. There are some domains where figuring everything up front is very important. Others, where trial and error is far more productive." Yes people seem to learn much better by example. The worst teachers (we have all had them) are those who jump s…
Re: A Year of Functional Programming
#80" Recently I looked at some code I wrote 8 months ago and was shocked! I looked at one file written in “good OO-style”, lots of inheritance and code reuse, and just thought “this is just a monoid and a bunch of crap because I didn't realise this is a monoid” so I rewrote the entire thing to about a third of the code size and ended up with double the flexibility. Shortly after I saw another file and this time thought…