On Sun, Jul 20, 2008 at 02:45:04PM +0200, Istvan Buki wrote:
For example, I use it to implement a join component. It works more or less like a join between two database table but here the table records are represented by fusion maps and in each map there is a field used to simulate the where clause. Using the fusion::at_key<> function on a map makes that very easy.
This "where" simulation - what does the field contain? A function object? In that case, which arguments does the function object take? ("Join" is actually a cartesian product, and "where a.x = b.y" over primary keys is just a special case of a predicate that creates "natural join".)
It also makes it very easy to filter out a column in a table with the fusion::erase_key<> function.
What is erasing keys useful for? Which concrete task does it solve? The structure already exists in its fullness in memory after it has been loaded from the file (or am I mistaken there?), so I doubt that it is for runtime efficiency. I mean, isn't "filtering out" more expensive than just ignoring the column? Why do you list this as an advantage? == BTW, I'm not challenging your choices in any way -- I'm just trying to learn something on a concrete example.