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

Andrey Khropov andrey.khropov at gmail.com
Sun Jan 7 17:39:37 CET 2007


Hello all!

Sometimes all we want in simple cases is a Plain Old Data type with no
encapsulation (i.e. all fields public). To reduce declaration clutter it would
be nice to have a special version of Record Macro:

-----------------------------------------
[Record(Public)]
struct Person
{
	name    : string;
	surname : string;
	id      : int;
}
-----------------------------------------

which would be just equivalent to
-----------------------------------------
[Record]
struct Person
{
	public name    : string;
	public surname : string;
	public id      : int;
}
-----------------------------------------

-- 
AKhropov




More information about the devel-en mailing list