Just like warm stream of irony

I've been tinkering with my graphics engine buffer for just to long and decided that it's time to do something about it and get awesome results. However, macros (or rather C's limited-for-a-reason syntax) can't do all the stuff I want to do. Especially if it's about iteration where I'd like to have a FOR loop inside another FOR loop header because I'm iterating over multiple elements at the same time but want to have a single if/while/for block where the user can decide whether he wants to use an expression or a code block for the iteration code.

I know that's sort of micro beefing, but I don't to have any of this in my very own library. Even in C++ you can't abuse class and templates to inser anonymouse code blocks inline. You could only create classes that have parts to the iteration, which's very, very incovenient if you want to keep related where it belongs: inside the function/method/algorithm that's using it. *sigh*, I can't do anything else but introduce a system that works like some sort of macro interface for loop iteration. Iterators are completely different from loop expression where every logic relies inside the code to insert. You could of course still use (possibly inline) functions if you want to keep more iterator-style code, but most of the time I need more loop statements than iteration fragments in my code.

Sooo, I'm going to regret this one day, but I can't leave it in it's current state. Just not perfect enough to please my needs!

No comments: