I was just fooling around with some Domain Specific Language designs for a new project in C/C++ when I thought up this "odd" solution:
define DSL(...) MakeCommand(#__VA_ARGS__\
)->Exec()->GetResults()
MyResults results = DSL( for p in people do something );
The nice part is this is correct by the standards (but so is a Duff Switch), and cross-platform, portable, etc... However this method is really not any better than writing strings into code, but since the DSL engine parses strings anyways, it seems to look prettier this way, and reduces the clutter. But was wondering what do other folk think about it.
Thanks