Robert Fisher

Just thinking out loud

Problems with the C++ standard library

If you register and log in you can add comments to my pages. If viewing the main blog page, click the # underneath an entry to comment on it.

Operator overloading abuse

People criticize C++ because operator overloading can be used to do really bad things, like define + to be subtraction.

C++ advocates counter that just because a feature can be abused is not a reason to discard the feature. They advocate using operator overloading sensibly instead of cleverly.

The standard library, however, uses the shift operators (<< & >>) for input & output.

Make the easy stuff hard

For some reason (...which I should look into...) the guardians of the C standard never made the C standard I/O streams extensible—which would be easy to do.

So, with its claims of OOPness, the C++ I/O not only should be extensible, but it should be a snap, right?

Appearantly not. Creating a set tcp_stream classes is much, much harder than it should be.