On Apr 3, 5:16 pm, "Alf P. Steinbach" <al...@start.no> wrote:
* Leigh Johnston:
"Alf P. Steinbach" <al...@start.no> wrote in message
news:hp7p5m$6rb$1@news.eternal-september.org...
I repeat: interface augmentation (which is what my reply was referring
to) is quite valid
Sometimes interface augmentation is a good idea, but in this
case there is no interface augmentation.
Strangely enough, I have to agree with Leigh here. (Doesn't
happen very often.) From what little we know of the global
context, this seems very much like what I would call "interface
augmentation". My only objection to the derivation is that in
C++ (unlike the case in e.g. Java), the idiomatic form of
interface augmentation is by using free functions: we have
std::sort, rather than std::vector<>::sort, etc.
In addition to the code itself we have the OPs statement that std::vector<Point>
is just an arbitrary implementation detail, where all he uses is push_back.
It's not an intended interface.
And with no intended interface there's no augmentation.