introduce membername and DDocComment Property?
davidl
davidl at 126.com
Thu Dec 7 00:25:16 PST 2006
love to see someone like my idea :)
hope walter would at least add membername 8-)
> "davidl" <davidl at 126.com> wrote in message
> news:op.tj4diqpqeb62bo at david.ars...
>>
>> why not introduce member's name to our tuple like we have
>> class myclass
>> {
>> int membera; //membera is used for bar
>> char[] memberb; //memberb is used for foo
>> }
>>
>> auto a= new myclass;
>> then we have a.tuple[0].membername reference to char[] 'membera'
>> and a.tuple[1].membername reference to char[] 'memberb'
>> a.tuple[0].ddoc reference to 'membera is used for bar'
>> a.tuple[1].ddoc reference to 'memberb is used for foo'
>>
>> now we can have some meta programming for easy debugging!
>
> I'd also really like the .membername property -- it seems only logical to
> supply that as well as the type and the value. This would also make some
> reflection possible.
>
> But I hadn't thought of having a .ddoc member as well.. that's a great
> idea!
>
>
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
More information about the Digitalmars-d-learn
mailing list