User Defined Attributes
Tove
tove at fransson.se
Wed Nov 14 04:55:42 PST 2012
On Wednesday, 14 November 2012 at 12:33:58 UTC, Jacob Carlborg
wrote:
>
> I assume you mean something like:
>
> struct UserProfile {
> [1] i32 uid;
> [2] string name;
> [3] string blurb;
> }
>
> In that case I would much rather prefer this:
>
> struct UserProfile {
> @Id(1) i32 uid;
> @Id(2) string name;
> @Id(3) string blurb;
> }
>
> Where Id is "thrift.attributes.Id" or something similar.
well, similar... but beginning with a symbol...
[thrift.attributes.Definition]
struct UserProfile
{
[1] i32 uid;
[2] string name;
[3] string blurb;
}
More information about the Digitalmars-d-announce
mailing list