std.serialization: pre-voting review / discussion

Jacob Carlborg doob at me.com
Wed Aug 14 02:26:54 PDT 2013


On 2013-08-14 11:17, Tove wrote:

> I understand the need for Orange to be backwards compatible, but for
> std.serialization, why isn't the old-style mixin simply removed in favor
> of the UDA.

I don't know, it doesn't really hurt to be present. And for anyone using 
Orange they only need to change the imports to have it work with 
std.serialization.

> Furthermore for "template NonSerialized(Fields...)" there is an example,
> while for the new style "struct nonSerialized;" there isn't!

Good point, I'll add an example.

> I find the newstyle both more intuitive and you also more dry not
> duplicating the identifier: "int b; mixin NonSerialized!(b)"
>
> @nonSerialized struct Foo
> {
>      int a;
>      int b;
>      int c;
> }
>
> struct Bar
> {
>      int a;
>      int b;
>      @nonSerialized int c;
> }

Absolutely.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list