[Box Backup-dev] Getting trunk ready for release

Gary boxbackup-dev at fluffy.co.uk
Thu Dec 15 18:43:56 GMT 2005


Well, I believe that the whole operator thing going on here is
indirectly my fault - I introduced a serialization class to Box code
some time ago that overloaded << and >> operators in a chain-like
manner, and Ben wasn't crazy about it (hence my LOL previously ;)). The
subject keeps coming back 8).

Practically speaking, a (*this) returning << operator compiles down to
the same as a chain of bool Write() calls (given, we are using
exceptions for error handling), but it is a valid point when it comes
to code style. Ben's aversion to operator overloading is similar to my
aversion to COM/DCOM stuff - while some consider COM/DCOM a blessing, I
consider it a pathetic, idiotic mess, that should have been solved at a
C++ specification level, as it is nothing more than a runtime object
reflection plus some interoperability stuff (Microsoft has finally
figured it out for the C# language). Oh, well.

> now it sounds like you don't want << used at all in the code 
> for output.

If my memory serves me well, you can always cast to char* and wite() to
avoid the overloaded operators? ;)

> Historically I've also seen more bugs with bad printf use than 
> bad stream use.

Very good point.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Boxbackup-dev mailing list