From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-09-27 18:06:08
On 09/27/2005 05:05 PM, Calum Grant wrote:
>>[mailto:boost-bounces_at_[hidden]] On Behalf Of Larry Evans
>>>Is there any interest in providing relational containers in Boost?
>>>Are there any features/improvements you can suggest for RML?
>> The reason this has to be a macro is because it needs to work with
>> names, not just types. It was felt that the benefits of
>>being able to
>> write customer.name or customers.name instead of
>> or col<1,1>() outweighs the inherent disadvantages of
>>using a macro.
>>why not use an enumerator:
>>instead of a number:
>>? Would this eliminate the macro need?
> An early RML did use tuples indexed in the way you describe. I did use
> enums - writing magic numbers is very bad for readibility and
^^^^^^^^^^^^^ I guess you mean an enumeration here?
> maintainability. Personally I prefer to read
> instead of
Well, how about:
IMO, that's only marginally more verbose and just as readable.
> There is also a big problem with enums - being able to associate the
> correct enum with the correct type. I.e. the "name" column may be 2 for
> customers, and 3 for products. So you really need
> column<customer_name>(customers) and column<product_name>(product).
OK, that's a little less readable :( , but I guess you believe the
disadvantage of macro use is not as bad as the disadvantage of
prefixing customers:: to the enumerator. I'm not that sure.