[Haskell-beginners] How Haskell Fits Into an Operating System / API Environment

Philippe Sismondi psismondi at arqux.com
Sat Aug 10 16:22:06 CEST 2013


I am interested in tracking down discussions on how Haskell fits into an operating system environment. That is probably not a very clear question, so let me explain.

One of the great obstacles I have faced in using two of my favourite languages (Common Lisp and Haskell) for anything practical is that I am constantly frustrated by their relationship with the host OS, or perhaps more accurately with the APIs provided by the OS.

For example, I tend to program mostly on OS X. I have a reasonable knowledge of Cocoa, and can get quite a lot done with Objective-C. So, if I want to use Haskell on OS X, I can run off and learn about Haskell's FFI, or some hand-rolled widget package, etc. But here is the problem: Cocoa et al provide an entire ecosystem that includes data structures, error handling, and so on. So, when trying to use Haskell with a GUI, or perhaps to do some audio processing, or other things that are provided by the OS X APIs, I feel that I am layering two quite incompatible worlds together: Haskell and its host environment. 

I ran into the same dilemma with Common Lisp. Clozure Common Lisp provides an excellent Cocoa binding. But using it feels (to me) like communications between alien races. The OS APIs want to do things the Objective-C way, and that is (clearly) not the Haskell or Lisp way.

One soon notices that books on Haskell pay virtually no attention to this issue. At least, the ones I have don't.

Maybe what I am really experiencing is that OS X just "wants" to be programmed in its native language. I had something of a better feeling about using F# on Windows, because that architecture does leverage the native stuff much better.

The upshot is that I remain skeptical that Haskell is actually a practical language for many kinds of development.

Can anyone point me to discussions on this? I may be having a dimwitted interval here, but I don't know what to search to find this.

- P -



More information about the Beginners mailing list