From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-06-20 09:35:52
On 06/20/2005 07:08 AM, Maksym Motornyy wrote:
> The main reason why it was hard to read your code is my lack of
> knowledge what are you trying to implement. This link clarifies a lot.
> Second, I wonder why somebody wants to have named fields in tuples?
> Isn't tuples designed to be anonymous inline-declarable structs?
> Otherwise it's better to use plain struct's (of course I can be wrong).
Well, there you made me think again. I just believed names would
be better than indices and that belief was supported by some post
to some mailing list or newsgroup (I thought it was the loki mailing
list at http://sourceforge.net/mail/?group_id=29557 ; however, I can't
find it now). So I searched some more and all I found was:
where the phrase:
"cannot be accessible by name, only by index"
suggests the author also believes that named access is better than
indexed access. I also found:
which, in section A.1.2, contains:
named index for every property
which suggests the same as the previous citation.
I had in mind something like the enumerations could represent field
names in a database record, and the corresponding typelist would be
the types of those fields. I was thinking that then writing some
relational algebra mpl classes would then be easier with named
indices rather than numbered indices. I was also thinking of
how you would understandably describe such a database schema
without using names (i.e. enumerators like "first_name", "last_name"
"social_security_number") rather than numerals (0,1,2).
Anyway, I hadn't carefully thought it out, I'd just jumped to the
conclusion that names were better, although after some research
on the topic (which, sadly, I can't reproduce at the moment. I know
I had the loki maillist reference bookmarked at one time, but it's
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk