[nem-en] Record macro extension.
Ivan A Eryshov
ivan.eryshov at gmail.com
Sat Feb 24 19:48:01 CET 2007
I would like suggest extension to Record macro. But, actually I'm not sure
is it possible in current implementation. Code:
[nemerle]
class A
{
_field : B;
public this ([NotNull]field : B) { _field = field; }
}
[/nemerle]
I can't use [Record] here because of [NotNull] needs to be provided. So, we
can add one more argument in Record macro:
[nemerle]
[Record(Include = [_field], Attributes = [NotNull])]
class A
{
_field : B;
}
[/nemerle]
But, this isn't a good solution as "_field" will be rated as regex and can
match more than one field. Also, can be situation when I need apply more
then one attribute/macro.
What do you think about all of this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070224/f09f5bd3/attachment.html
More information about the devel-en
mailing list