How to do pragmatic high-level/meta-programming?
- by Lenny222
Imagine you have implemented the creation of a nice path-based star shape in Lisp. Then you discover Processing and you re-implement the whole code, because Processing/Java/Java2D is different. Then you want to tinker with libcinder, so you port your code to C++/Cairo.
You are (re)writing a lot of boiler plate code, while the actual requirement "create a star shape" (or "create a path, moveto x y, lineto x y") has not changed.
What are the options to encapsulate those implementation details? Some sort of pragmatic meta-programming? Maybe an expert system? How would you define your core business logic as language-independent as possible?