FFI - Approaches to C/C++

Hi, I'm working on a project in Haskell and C++ where the former is the brains and the latter is for UI, interaction etc. I've read this http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ and a number of other haskell posts suggesting the OOP is not the way to go. Without trying to emulate functional programming through templates or boost::phoenix, what approaches do you all favor when designing parts of an application in C++? Patterns to embrace or avoid? Should I just use functions and handle things with name spaces? I was thinking about handling the callbacks with boosts signals and slots 2 I know this is not entirely haskell centric, but it is a question for haskell users. Thanks, Casey -- Casey James Basichis Composer - Cartoon Network http://www.caseyjamesbasichis.com caseybasichis@gmail.com 310.387.7540

Casey Basichis
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. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.

On Thu, Jan 31, 2013 at 11:11 AM, Casey Basichis
Hi,
I'm working on a project in Haskell and C++ where the former is the brains and the latter is for UI, interaction etc.
I've read this http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ and a number of other haskell posts suggesting the OOP is not the way to go.
Without trying to emulate functional programming through templates or boost::phoenix, what approaches do you all favor when designing parts of an application in C++? Patterns to embrace or avoid?
Should I just use functions and handle things with name spaces? I was thinking about handling the callbacks with boosts signals and slots 2
I know this is not entirely haskell centric, but it is a question for haskell users.
Thanks, Casey
And then I'm on iOS so I imagine those difficulties are compounded.
If you can tolerate the view that Haskell is more of an ideology than a technology, and are willing to explore areas that are technologically disparate but conceptually similar to Haskell maybe you should look at ocaml: http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone/index.html http://psellos.com/ocaml/compile-to-iphone.html Rusi -- http://www.the-magus.in http://blog.languager.org
participants (3)
-
Casey Basichis
-
Ertugrul Söylemez
-
Rustom Mody