[nem-en] [Proposal] Extend Record or Accesor macro to create POD types

Kamil Skalski kamil.skalski at gmail.com
Mon Jan 8 10:02:00 CET 2007


07-01-08, Michal Moskal <michal.moskal at gmail.com> napisał(a):
> On 1/8/07, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> > I would prefer a separate macro to mark (chosen) members with (any)
> > attribute. It could look like
> >
> > [MarkWithAttribute (Public, Fields, Include = [foo, bar])]
> > class A {
> >   foo : int;
> >   bar : int;
> >   waa : int;
> > }
> >
> > I'm not sure, maybe the "fields" part could be omitted.
> >
> > Then we could add this attribute also in Record, since "record"
> > usually implies that this is plain storage with public fields.
>
> Yes, using it explicitly kind of defeats the point -- seems longer
> than writing 'public' everywhere.

The shortest (usual) version would be

[AddModifiers (Public)]
class A {
 ...
}


-- 
Kamil Skalski
http://nazgul.omega.pl


More information about the devel-en mailing list