Thread overview
introduce membername and DDocComment Property?
Dec 06, 2006
davidl
Dec 07, 2006
davidl
Dec 07, 2006
Don Clugston
December 06, 2006
when a project grows, as we can see the big Reactos project debugging method is really need to be brushed up.
Consider in Source File A
and A imports B
B imports C,D,E,F,G.....
tons of source files are imported by B, what can we do when we want to look the
definition of a class in A effectively if we can't remember what it is, or simply
our viewers just not familiar with the whole project.
Now some people would suggest me using DoxyGen.
Actually I don't require a whole Doc. And generating a whole doc for a big project
is a pain in the ass.

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!


-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
December 06, 2006
"davidl" <davidl@126.com> wrote in message news:op.tj4diqpqeb62bo@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!


December 07, 2006
love to see someone like my idea :)
hope walter would at least add membername 8-)

> "davidl" <davidl@126.com> wrote in message
> news:op.tj4diqpqeb62bo@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/
December 07, 2006
davidl wrote:
> when a project grows, as we can see the big Reactos project debugging method is really need to be brushed up.
> Consider in Source File A
> and A imports B
> B imports C,D,E,F,G.....
> tons of source files are imported by B, what can we do when we want to look the
> definition of a class in A effectively if we can't remember what it is, or simply
> our viewers just not familiar with the whole project.
> Now some people would suggest me using DoxyGen.
> Actually I don't require a whole Doc. And generating a whole doc for a big project
> is a pain in the ass.
> 
> 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!
> 

Rather than .membername, it would be sufficient to allow indexing and slicing on alias tuples. It would certainly be useful.

> 
> --ʹÓà Opera ¸ïÃüÐԵĵç×ÓÓʼþ¿Í»§³ÌÐò: http://www.opera.com/mail/