slices ; Stroustrup & libstdc++
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Mon Jun 19 00:32:00 GMT 2000
brent verner <brent@rcfile.org> writes:
| On 18 Jun 2000 at 23:08 (+0000), Gabriel Dos Reis said:
| | brent verner <brent@rcfile.org> writes:
| |
| | [...]
| |
| | | FWIW, Josuttis (whose book Rocks!) only gave examples using
| | | slice_array& valarray::operator[](slice) as an lvalue, and
| | | mentioned that the valarray classes, "were not designed very well.
| | | In fact, nobody tried to determine whether the final specification
| | | worked."
| |
| | But that isn't a reason to write ill-formed programs. Is it?
|
| Of course not, but if the spec is flawed (which I'm not qualified
| to determine, hence the quote by someone who might be :), it could
| be impossible to write well-formed progs that adhered to the spec.
I don't want to do a C++ hair splitting but the quote didn't say that
the spec is flawed but that the classes were not very well designed.
Whether the design is good or not is certainly debatable -- and other
widely used components of the standard library can be subject to the
same comment.
Actually, I'm tired of hearing that quote as excuse over and over
instead of trying to understand the library. There are some design
errors in the valarray library (as there are in the rest of the
standard library), but they have nothing to do with the code shown in
the orginal post.
-- Gaby
More information about the Libstdc++
mailing list