|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-12 10:27:58
From: "Mark Rodgers" <mark.rodgers_at_[hidden]>
> From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> >
> > Good point, but then string has 'length' as well. Anyway, I was giving
> > length just as an example.
>
> Yes it does, but I'm not sure why because it also has size. I suspect
> it was left in by mistake after the STL interface was retrofitted to the
> string proposal. But the point remains for all the names - you should
> reuse established names for algorithms and operations instead of
> inventing new ones:
>
> - It should be at instead of TypeAt.
> - It should be find instead of IndexOf.
> - It should be push_back instead of Append.
> - It should be unique instead of NoDuplicates.
Not in this case, actually.
The Lisp-style version of type lists (or compile-time lists in general)
don't follow the STL idiom; they follow the Lisp idiom.
Renaming 'append' to 'push_back' is not simply unnecessary, it's harmful.
Besides, function names are not _that_ important. What is important is to
provide the fundamental primitives - cons, car, cdr (no matter how they're
spelled) - like Lisp does. Everything else can be implemented (by the user)
on top of it.
Of course we will provide the common functions, but only for convenience and
as an example. Just like the STL does.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk