News for hackers. Stuff that matters.
Re:Functional programming's smugness problem by CJefferson on Wednesday April 18, 2012 @11:57AM (#3858567)
I find that many functional programmers, including Haskell programmers, seem convinced that I will completely abandon C++ if only I spent the time to understand Haskell.

After spending quite a bit of time learning Haskell, seeing a number of advantages and disadvantages, and being unconvinced and staying with C++, the assumption is I didn't "do enough".

Of course, I also know a number of lovely functional programmers as well!

Re:Functional programming's smugness problem by dmlorenzetti on Wednesday April 18, 2012 @12:29PM (#3858763)
Happily, my experience was quite different.

I used to attend the Bay Area Functional Programmers meetings (apparently now defunct). At one point, I mentioned that I was having a hard time applying FP to my work, which requires lots of iterative updates to vectors that represent states in physical systems.

The general reaction was not that I simply wasn't committed enough to FP. Rather, it was a very thoughtful version of "Yeah I can see where pure FP probably isn't a good fit".

Re:Functional programming's smugness problem by fusiongyro on Wednesday April 18, 2012 @01:35PM (#3859172)
> I find that many functional programmers, including Haskell programmers, seem convinced that I will completely abandon C++ if only I spent the time to understand Haskell.

With enough work, you can accomplish any task in any language. The only thing you can't do is force yourself to use something you don't like. So I commend you for giving it a try, but I certainly don't begrudge you for not liking it or using it for everything.

Programming language proselytization is one of the most obnoxious things about our industry. We love to cloak our feelings in rational language, but at the end of the day, all of the design decisions in a language are choices that have upsides and downsides. Some of these upsides are going to be valuable to a particular user or a particular problem, a lot of them are going to be irrelevant and a few will be detrimental. The factor that determines success is absolutely the individual and not the language.

Believing your language is the best must help motivate people to use it, but it is definitely an irrational belief, and not a technical fact. Advertising language differences as factual improvements when they are, at best, assumptions derived from untested principles must be doing for our industry what snake oil has done for Western medicine.

Re:Functional programming's smugness problem by mgkimsal on Wednesday April 18, 2012 @12:03PM (#3858611)
This is almost the definition of religious differences.

Adherents of religion X will tell you how it changed their life, and it can change yours too, if you just believe hard enough.

When you investigate, find problems or just say "it's not for me", it's "your fault" for doing it wrong, or with a bad attitude, or you didn't talk to the right people, or you'll "grow up" later and 'see the light'.

Re:Functional programming's smugness problem by sold on Wednesday April 18, 2012 @12:39PM (#3858825)
I disagree - choosing a language is not choosing a placebo. Languages are tools, and need to be chosen appropriately. Often the exact choice will not matter (compare Java/C# or Python/Ruby), but sometimes it will.

"it's not for me" is not a valid excuse, it means you cannot handle the tool. This is your fault. A valid excuse is "it's not for my application domain".

Re:Functional programming's smugness problem by jleader on Wednesday April 18, 2012 @01:59PM (#3859314)
Languages are tools to be used by people, not by identical automatons. "This tool doesn't mesh well with the way I approach this class of problems" is a perfectly valid objection.
Re:Functional programming's smugness problem by orclev on Wednesday April 18, 2012 @02:33PM (#3859493)
In my case it's more often "this language makes tradeoffs that are counter to the way I want to work". E.G. I won't touch C++ with a 10 foot pole because I believe it's the compilers duty to track down and at least warn me about as many errors in my code as possible, and C++ seems to go out of its way to allow you to introduce subtle and hard to find bugs. I've worked in a ton of languages from nearly every paradigm (no logic languages yet) and in each one I've found at least one language that works best for me, or best in a particular problem space. Some of that choice is based on need (must be able to search text easily, must have a strong HTTP framework, must have a nice cross-platform GUI, must have strong matrix math framework, etc.), and some of it is based on preference (prefer strong typing, prefer meta-programming features, prefer garbage collection).
Re:Functional programming's smugness problem by Peaker on Wednesday April 18, 2012 @12:10PM (#3858657)
C++ and Haskell have some overlap, but mostly cover different domains. Do you use C++ for high-level application programming that has no performance requirements? Conversely, I would not use Haskell for low-level code that has to have very predictable, tight resource use on an embedded device.
Re:Functional programming's smugness problem by stcredzero on Wednesday April 18, 2012 @12:40PM (#3858831)
Do you use C++ for high-level application programming that has no performance requirements?

I understand this has been done a number of times.

Re:Functional programming's smugness problem by DannoHung on Wednesday April 18, 2012 @12:09PM (#3858645)
Maybe you're not ready to leave C++, but if you don't have a slightly icky feeling from C++ compared to Haskell, then you've been programming C++ for so long that the weirdness has metabolized.
Re:Functional programming's smugness problem by KingMob on Wednesday April 18, 2012 @01:18PM (#3859064)
Errr... perhaps you meant metastasized? Or solidified/ossified?

I think if it had metabolized, that would mean your body had burnt up the weirdness and gotten rid of it.

Re:Functional programming's smugness problem by CJefferson on Thursday April 19, 2012 @05:53AM (#3862164)
This is exactly what I am talking about, I'm "not ready to leave C++".

C++ certainly has it's faults, and some of them are quite painful. However, I find there are things I can do nicer in Haskell than C++, but some jobs call for an XORed linked list, or implementing trailing by knowing my underlying types are C and just calling memcpy, and I can't do that in Haskell.

At http://minisat.se/ , you will find Minisat, an (in my opinion) neat, easy to read(ish) and highly efficient C++ program. I've seen numerous people try to turn it into Haskell and all they have ended up with is something less readable, and much slower.

Re:Functional programming's smugness problem by podperson on Wednesday April 18, 2012 @01:15PM (#3859046)
To borrow from The Onion, like violence, my favorite programming language solves all problems. If it doesn't solve a problem, use more!
Re:Functional programming's smugness problem by papsosouid on Wednesday April 18, 2012 @12:18PM (#3858695)
Did you actually mention any of these disadvantages? Most often I see the attitude you describe when someone says "I tried haskell/lisp/ocaml/scala/clojure but it isn't practical". And that's it. No explanation of what their problems were, just "nope, it obviously can't be used for anything practical and you must be crazy if you think you can use such a language". After seeing that kind of nonsense enough, it can be easy for somebody to fall into the trap of assuming you didn't really try it either if you don't bring up some specific problems.