Re: inheriting from std::vector bad practice?
* Nick Keighley:
On 8 Apr, 11:11, "Alf P. Steinbach" <al...@start.no> wrote:
* Nick Keighley:
On 3 Apr, 17:16, "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...
* Leigh Johnston:
* Alf P. Steinbach:
* Leigh Johnston:
The only time it is unwise to use public inheritance is if your
class invariant consists of more than just vector's invariant in
which case it might be possible to break your class's invariant by
calling the vector's member functions, but I don't believe this is
the case in your example (i.e. you are simply performing interface
augmentation).
Sorry, that's bullshit. Proper design involves much more.
didn't you start being rude first?
Depends on your definition of "rude", but who cares. I was precise.
must be a cultural thing. Where I'm from its rude. I'm not saying I
wouldn't use it but I'd use it knowing I was being rude. It seems odd
to me to tell someone they are bullshitting and then complain of
rudeness when they say you are full of shit!
I said a statement was bullshit, and it was.
You're saying I said someone is bullshitting. That is at best misleading, since
it is a statement about a person. But considering what you're writing below,
which is a pure personal attack, I think you intended also the above as such.
In other words, you're trolling.
But whatever.
<url:http://en.wikipedia.org/wiki/Bullshit#Distinguished_from_lying>
<snip>
It's
possible to disagree over what constitutes a good design and whether
something constitutes good design, but in this case it's about the
opposite, a technique that's almost universally recognized as
Bad(TM), so, no discussion.
could you expand on that for the benefit of those of use who are not
quite so wise in C++ design principles?
Huh. Benefits of a bad technique?
no benefits of explanation (are we speaking the same language?)
perhaps you you could explain *why* it is bad.
It has been explained in detail by several posters in this thread (including
contributions from me).
If that's not good enough for you, then pick up any good book on design.
Or are we just supposed to accept your god-like authority?
OK, "we" => you're schizoid or have grand delusions of being royal, "your
god-like authority" => you're a troll, and a pretty stupid one to try to make
that argument in this group.
Cheers & hth.,
- Alf