
Jim Hyslop wrote:
I've been looking at the serialization library (nice work, Robert) and I have a question. I searched the archives and didn't see any discussion on this, and I'm sorry I missed all the pre-approval discussion, or I would have said something sooner.
What is the rationale behind using 'operator &()' to mean 'serialize this item?'
I find a statement like 'ar & member1;' to be very non-intuitive: how does bitwise-and relate to serialization?
It seems to me that most sensible code guidelines admonish against this kind of operator abuse (pardon my bluntness, but that's what it is when you get down to it).
What other operator would you suggest? - "<<" is not good because the library can not just save, but also load data - ">>" is not good for the same reason - Writing a.serialize(member1).serialize(member2) is very inconvenient. - Volodya