Oh man, that mix of macros and templates I used to get some kind of template-based formula done really is a mess. It'd be possible to define all kinds of formulas in such a construct, but I think it's just better to create a class-internal functions instead and call from there. Really, you don't want to see that. I can cope with templates in templates and so on, but if the templates aren't actually going to be templates in the template sense but templates in a sense that you'd normally solve it by using template FOR templates but can't cause there are too many stupid depencies and you are forced to used template just like parameters you already know and which you can't iterate cause you always need to give a fixed number of parameters. I thought about using stdarg, but there wouldn't be any type check and thus you wouldn't be able to get what parameters to pass then! Plus you need to invoke functions during compile-time for that, making it totally useless for strongly typed stuff...

Well, it was an idea, good to know that I now know that it wasn't a really a good one.

No comments: