[Haskell-cafe] Request For Feedback: Emulating OO-style dispatch for binding ...
aditya.siram at gmail.com
Tue Dec 16 18:41:09 UTC 2014
I am writing a GUI binding but unfortunately could not find a OO-style
dispatching scheme that I was happy with so I wrote my own (
The design goal is to:
- provide a single function that will dispatch to a custom implementation
based on the type of argument it is given
- allow the user to extend and subclass the hierarchy and override
functions in a way that doesn't involve recompiling the binding
- use as few new extensions as possible
- provide as familiar an API as possible, thereby allowing users to
leverage existing documentation maintained by the C++ project.
The look-and-feel of the API is on lines 128-140.
It should just be a stand-alone file that can be loaded into GHCI.
Thanks for your feedback!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe