From: Stefan S. <se...@sy...> - 2003-02-06 18:52:25
|
Jonathan Wakely wrote: >>Element *element = ...; >>my_function(element->children_begin(), element->children_end()); >> >>which is rather elegant and intuitive (and consistent with STL), >>don't you think ? > > > No. It is not consistent with the STL. The STL clearly defines names for > required methods, so it should be begin() not children_begin(). > If the interface conforms to one of the STL concepts then the names > should match to indicate as much. A STL-savvy user who reads something > saying "The libxml++ Document is a model of an STL Forward Container" > will asusme they can write code using the "begin()" method. it's not the container itself that is 'standard compliant'. But the iterators it returns are. Stefan |