On 2013-02-18 02:27, Steven Schveighoffer wrote:
I think Walter's point is that the author of foobar may not have opted in.My response to that is, so? If someone is trying to serialize your class, and you didn't test for that, too bad for that person if it doesn't work. The reality is, an author may write foobar without intending it to be serializable, but it actually is. In that case, it is still on the user, but if it works, great! The user is taking the risk that later the serialization breaks, and could always submit a patch to the author of foobar if it somehow becomes not-working in a future version. To have to say: struct S { int x; int y; } is serializable seems like super-redundant info. The D type system is one of the most advanced I've ever seen. Let's try and use it!
I agree. -- /Jacob Carlborg
