[Haskell-cafe] FFI - Approaches to C/C++

Casey Basichis caseybasichis at gmail.com
Thu Jan 31 08:08:39 CET 2013

Hi Ertugrul,

I'm not entirely sure what you mean.

I'm intending on using Ogre for GUI - for which there is the Hogre
bindings, but after emailing the DEV about it, I didn't get the
impression from his advice that I should be using it for production
code.  Here is what he suggested:

"It depends, really. Hogre is good for running Ogre from within
Haskell, but it has its limitations. The number one thing people have
been struggling with is handling input with hogre - there's Hois
(Haskell wrapper for OIS) but it's not perfect (it misses input
events), and the other option is having to write some C++ glue. Hogre
is a solid proof of concept and you can do some demos with it, but if
you're e.g. writing a game it might be a bit of a struggle. In the end
it's about how much you value being able to write code in Haskell (or
how allergic to C++ you are)."

I'm on iOS so I imagine those difficulties are compounded.

I am using several other C++ libraries for which there are no existing
bindings and no Haskell alternative packages that are even remotely

Are you suggesting it would be better to write all my own FFI bindings
for all the needed libraries?

Everything I read suggests that Haskells strengths are in
transformation and that interaction is not its strong suit.

I am interested in your thoughts and I am open to whatever, but you
are the first to suggest that the mix is a bad idea.



>>* I'm working on a project in Haskell and C++ where the former is the*>>* brains and the latter is for UI, interaction etc.*
>That's a rather odd choice.  Not exactly answering your question, but
>questioning your project decisions, why would you do UI and interaction
>in C++?  You have the necessary Haskell bindings and libraries to write
>everything cleanly in Haskell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130130/a3339e9e/attachment-0001.htm>

More information about the Haskell-Cafe mailing list