C++ UI using Functional Composition

I think the following would be a neat concept if doable. The concept is to produce a UI in C++ using functional composition similar to what you have in functional programming languages. An example is Buckaroo’s Reactive Terminal Demo which is quite solid. Functional composition has a mathematical orientation as can be seen in the StackOverflow question about function composition in C++. An existing framework by the name of Sodium is on GitHub and is seeing some adoption. I looked into Sodium and understand that the C++ version is still a work in progress. Meanwhile, I have been reading a few functional programming books in the last 2 or 3 weeks and there are some good perspectives that I will discuss later.

Following my brief research into functional programming proper (namely Haskell, Lisp, and Clojure), I concluded that a structure similar to the following may be useful. The implementation is in C++ and follows from the latest writings from David Vandevoode, Nicolai Josuttis, and Douglas Gregor in their book, C++ Templates: The Complete Guide. Anyway, if I can get the following working, then I’ll have more to say on the topic of the intersection of functional programming and C++. As it stands, the latest build scripts for Fedora Linux and the basic skeletons for the .hxx and .cxx files is as far as I’ve gotten. The following link is to the git commit reflecting these changes.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.