4 ms·
Another, more important reason, is that Haskell is too intellectually demanding for most industrial programmers. t While that's often stated as a reason, I don
by gaius 16y ago
Another, more important reason, is that Haskell is too intellectually demanding for most industrial programmers. t
While that's often stated as a reason, I don't believe it myself, simply on the grounds that anyone smart enough to use C++ "in anger" is smart enough to learn any language.
The reason that Haskell isn't popular (IMHO) is that a lot of programming isn't clever algorithms, it's forms (interfaces for getting data into databases) and reports (interfaces for getting data out of databases). A lot more is glue (connecting the output of one program to another). Haskell just isn't a good fit here.
I am very excited by F#; here we have an ML dialect that has minimal impedance mismatch with the OO/imperative world (and C# with LINQ has minimal impedance mismatch with the declarative world of relational databases). This is where Haskell types should look for work...
- barrkel 16y agoI would argue that most people who use C++ in anger don't fully understand that language, and get by because they do what they know has worked before. The accumulated experience doesn't imply intelligence. That's not to say that I think that it's intelligence that's lacking with respect to Haskell etc. I think the problem there is the mode and style of thinking, and that most programmers are too old to easily pick up the different way of approaching problems that it becomes second nature. That, and functional programming's chosen compositional breakdown of fixed common data with an open-ended set of applicable functions is not always as applicable as object orientation's breakdown of open-ended data with inheritance of fixed sets of functions; you often need to introduce an extra level of indirection (=> abstraction) with functional programming to get access to the dynamism that OO gives you in the box.
- deleted 16y ago[deleted]
- jamii 16y ago> it's forms (interfaces for getting data into databases) and reports (interfaces for getting data out of databases) Well, with formlets and takusen you're pretty much sorted. http://haskell.org/haskellwiki/Formlets http://haskell.org/haskellwiki/Formlets http://blog.codersbase.com/2010/08/takusen-tutorial-part-1-hello-takusen.html http://blog.codersbase.com/2010/08/takusen-tutorial-part-1-h...
- jrockway 16y agoWhy is Haskell not a good fit for glue? That's what I use it for, and it works great -- my programs are short, efficient, and easy to write and test. My first Haskell project for work was initially a C++ project, but it was too hard to use C++ as a glue language, so I switched to Haskell. I would have used Perl, but Haskell works better on Windows and has an easier-to-use FFI. I actually ended up spending more time trying to get some old version of Visual Studio to link against my super-old-proprietary-C-library that was the core of my project than I did writing the whole Haskell FFI binding to that library and writing the first version of the Haskell-based program. This turned out to be the most trouble-free program I ever wrote. It had to operate on large datasets, and never died in the middle (like I'm used to with Perl). The only bug that the program ever had was where one of my data validation rules was too strict, and rejected some valid date. (The validation rule said that the dates in the time series had to be increasing. But one series only had one point, and hence wasn't strictly increasing. The bug resulted in "Warning: bad data", though, not "Prelude.(!!): index too large", as the implementation was with fold.) Incidentally, as a result of this project, c2hs supports Windows DLL calling conventions :)
- gaius 16y agoAfter having written that, I realized it was more nuanced than that. Haskell's good for parsers, for example. I am actually working on one for a proprietary logfile format right now (it will "convert" said logfiles into SQLite .dbs). But if you have preexisting libraries for system A in Java and system B is CORBA then you would be mad to put Haskell in the middle, the impedance mismatch is too great.
- jrockway 16y agoThis is a software-engineering-in-general problem, though, not a Haskell problem. If you have a bunch of components that can only communicate in a very specific way, then all the components have to communicate in that very specific way. This limits flexibility and "working with the system" becomes the main engineering problem. I think this is why most software dev teams explode to needing 10 teams of managers to manage a million developers -- because so many "irreversible" decisions were made that the application becomes workarounds on top of workarounds. Haskell is not going to magically eliminate bad planning and the fear of refactoring. And similarly, it's not going to make it easy to keep adding shit on top of the shit pile, like Scala or Clojure would. (Not to dis on Scala or Clojure specifically. I've actually never seen anyone do this; they just add more Java 1.4.2 on top of their existing Java 1.4.2-only mess. It would be me that added the Scala or Clojure :) I actually have a problem like this right now; I'm starting re-development on an application whose components talk via CORBA over an ultra-expensive and ultra-overengineered proprietary message bus. My plan is to write a bridge between the proprietary message bus and JSON-RPC (or something like that) in Scala, and make the rewritten components only talk JSON-RPC. Then, when everything is rewritten, there is no more super-expensive-message-bus requirements, and we shut it off. Now we have the ability to write components in any language. (Also, the reason this doesn't count as adding shit on top of shit is because eventually the ugly bridge will go away. That only exists to make the rewrite into a refactor. You have to have a scaffolding, or all the shit will collapse on top of you and make a big mess. :) Now I know the reply is going to be, "well, not everyone can just replace their proprietary crap with something simpler and more generic", but again, that's not a Haskell problem.
- rwmj 16y agoI think "knowing C++" just involves rote-learning of lots of stupid rules. Whereas Haskell is really quite different. Don't forget that F# was "inspired" by OCaml ...
- thesz 16y agoLenovo used Haskell to glue packages and configuration pipelines with great success. http://cufp.org/archive/2006/slides/CliffordBeshers.pdf http://cufp.org/archive/2006/slides/CliffordBeshers.pdf They used Haskell's strong static type system to safely glue things together.