|
Boost : |
From: vesa_karvonen (vesa_karvonen_at_[hidden])
Date: 2002-01-21 17:02:37
--- In boost_at_y..., Douglas Gregor <gregod_at_c...> wrote:
> On Monday 21 January 2002 04:16 pm, you wrote:
[anip]
> > Actually, I'd like to hear if someone can suggest an even shorter,
> > but at least as intuitive, mnemonic than ELEM.
>
> BOOST_PP_(TUPLE_?)AT?
I thought about AT too, but I was thinking about dropping the
prefixes. If we decide to leave some prefixes, AT would probably be
better than ELEM. At least it is not an abbreviation.
Another alternative for ELEM that comes to mind is:
BOOST_PP_SELECT(N,I,T)
I find SELECT otherwise better than ELEM except that SELECT is longer
rather than shorter... What do you think about SELECT?
> It seems that by dropping the prefixes it will become very hard to
> read PP metacode, because there is no cue regarding the data
> structure. We only get away with short, nondescriptive names in
> other languages because the type system gives us some clue.
hmm... You may be right. I have recognized the problem, too. I was
thinking that the number of names and data structures to remember
would be sufficiently small that it would not become a major problem.
Currently there are only two data structures in the preprocessor
library: TUPLE and LIST. I would consider tuples and lists
as "native" data structures. I would guess that there will never be
more native data structures in the library. If it so happens that
more data structures are introduced later, then the new data
structures could start using prefixes. Tuples and lists are likely to
be very heavily used compared to other data structures.
Currently there are 68 public names in the library (including list
support). Most of the names are actually quite unambiquous and can
not be mistaken to be operating on data structures, for instance.
So, I think that dropping the prefixes might be justified in this
case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk