Alex Rivera | Logout

Haskell or D for GUI desktop application?

Asked 2010-10-05T11:14:55.090
16

I like haskell and many things connected with it as its type-engine, lot of packages at Hackage, nice community, active development etc.

Otoh, I had experience that some people gave up on our planned project considering Haskell too complicated (monads, lot of jargon from academia...) to grok (coming from C++ background), so it might be easier to bring some devs to our open-source project if we'd use D.

We want to develop general desktop application which needs to have database back-end (probably sqlite3), use C-lib for some extensive computational tasks (ephemeris calculation) and use Qt toolkit since we hope to provide 'light' version for MeeGo in the future.

Ability to document source-code easily as well as maintainance are impotant factors since our feature list is long and considering we'll develop in our free time, it may require long time to write everything what we'd like.

Python & other scripting languages are too slow for the project and I do not want go back to C++ after so many years, iow, prefer some more higher-level programming...Without going into too many details, I've excluded some other langauges as well (Go, Clojure, Java..) which brings list down to Haskell vs D.

One concern regarding D is that recetly QtD project was suspended, so I'm curious if in the short term one can even count D as adequate option.

Any pro/cons which one might be more suitable as general programming language covering Linux/MaC/Windows platforms?

Edit: Let me just add link to the post I sent to D list where I explain in more detail about our requirements.

Edit
Report

2 Answers

12

Let's tease out some requirements here, and I'll try to make the Haskell case. Perhaps the D fans or others could try to do the same.

  • Desktop application

So Haskell's certainly used for desktop and server-side applications. The tools are available for all modern desktops, just using the Haskell Platform.

  • Database backend

Well known database backends for Haskell, that have significant use, are HDBC-* and sqlite, though there are many others.

Other commercial groups that have used database-driven apps in Haskell include: Galois (our sqlite library is linked above); Deutsche Bank (see the talk); Hustler Turf Equipment (home of HDBC).

  • C libraries (hence FFI bindings)

Haskell has a high level, widely used FFI, that is a standard part of Haskell 2010.

  • Use of Qt

qtHaskell was developed for a commercial application, and is used by e.g. JoyRide Labs for their commercial games.

  • Source code documentation

Haddock is widely used. Other analysis tools like: graphmod and sourcegraph also help with requirements documentation.

  • Maintainance

Several commercial users have cited pur

answered 2010-10-05T15:13:52.313
1

I have recently started to learn Haskell and measured timing for a simple example found in "Learn you a Haskell for great good." The example writes out all the right rectangles with integer sides less than 400 (in the tutorial it was less than 10, now I know why). The timing in WinGHCi was >34s (on a 6 core 3.3 Ghz AMD, 64bit Windows 7), not to mention the memory use indicated ~6GB. For a comparison I wrote this program in Ada (triple nested loops) and the timing was <0.1s. I would say you should save yourself a lot of embarassment and choose D. D is in the same category as Ada/C++ (actually it borrows a lot from Ada) but has many modern features and a very nice free compiler. There is a recent book about D by Alexandrescu and having read a good part of it I can testify that you can learn the language entirely within weeks (rather than years in the case of Haskell).

answered 2010-10-26T10:45:10.303

Your Answer