[Box Backup-dev] Getting trunk ready for release

Martin Ebourne boxbackup-dev at fluffy.co.uk
Thu Dec 15 23:07:32 GMT 2005


On Thu, 2005-12-15 at 10:43 -0800, Gary wrote:
> 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).

This is off topic and there's no need to continue the subject because I
think we all agree now, but I personally prefer named methods for
serialisation. I don't think code should hold surprises and any time an
operator does something different to normal that is a bad thing because
it is hiding a surprise. Normally it gains nothing either.

Streams are about the only place where it works, and then only because
they are absolutely endemic. Everyone knows exactly what they do, no
surprises. Maybe they should have made a new operator for streams, -<
and >- say. I'm sure that would have solved the problems.

> 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

I've never dealt with COM/DCOM. But CORBA is simultaneously very good in
what you can do, and a complete disaster in how it is implemented.

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

Not for ints, or floats, or most kinds of data types. Works for strings
though, but doesn't give any formatting control. Not really an option.

Cheers,

Martin.




More information about the Boxbackup-dev mailing list