www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - RFC: tupleof specification

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
.tupleof is ill-specified in D1 and D2.  It does not mention:

1) What happens when it encounters anonymous nested structs and unions
2) What happens when it encounters private or protected members

Bug 1223 (http://d.puremagic.com/issues/show_bug.cgi?id=1223) was reported 
last May.  It has not yet been resolved.  D2 "changed" the behavior of 
tupleof in regards to private/protected members (notice it's only 2 days 
after the comment Andrei made on this bug) but this change has still not 
been reflected in the spec.

I request that the behavior in these two cases (and indeed, any other 
special cases that you can think of) be clarified in both the D1 and D2 
specs.  I also request that the bug in the bugzilla be addressed, since it 
was reported for D1 but was never addressed.  Either mark it as 
wontfix/invalid or backport the change from D2. 
Feb 25 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:fpvjmp$4k7$1 digitalmars.com...

 Either mark it as wontfix/invalid or backport the change from D2.
And I just thought of a third possibility: in D1, change the behavior of the compiler (and the spec to match!) so that .tupleof just gives a tuple of public members. Doesn't break backwards compatibility but makes it actually possible to use introspection on aggregates with private/protected members rather than just giving an error.
Feb 25 2008
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:fpvjmp$4k7$1 digitalmars.com...
 .tupleof is ill-specified in D1 and D2.  It does not mention:

 1) What happens when it encounters anonymous nested structs and unions
 2) What happens when it encounters private or protected members

 Bug 1223 (http://d.puremagic.com/issues/show_bug.cgi?id=1223) was reported 
 last May.  It has not yet been resolved.  D2 "changed" the behavior of 
 tupleof in regards to private/protected members (notice it's only 2 days 
 after the comment Andrei made on this bug) but this change has still not 
 been reflected in the spec.

 I request that the behavior in these two cases (and indeed, any other 
 special cases that you can think of) be clarified in both the D1 and D2 
 specs.  I also request that the bug in the bugzilla be addressed, since it 
 was reported for D1 but was never addressed.  Either mark it as 
 wontfix/invalid or backport the change from D2.
I mean, I know how important _file extensions_ are, but could I get some kind of response on this?
Feb 28 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Jarrett Billingsley wrote:
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
 news:fpvjmp$4k7$1 digitalmars.com...
 .tupleof is ill-specified in D1 and D2.  It does not mention:

 1) What happens when it encounters anonymous nested structs and unions
 2) What happens when it encounters private or protected members

 Bug 1223 (http://d.puremagic.com/issues/show_bug.cgi?id=1223) was reported 
 last May.  It has not yet been resolved.  D2 "changed" the behavior of 
 tupleof in regards to private/protected members (notice it's only 2 days 
 after the comment Andrei made on this bug) but this change has still not 
 been reflected in the spec.

 I request that the behavior in these two cases (and indeed, any other 
 special cases that you can think of) be clarified in both the D1 and D2 
 specs.  I also request that the bug in the bugzilla be addressed, since it 
 was reported for D1 but was never addressed.  Either mark it as 
 wontfix/invalid or backport the change from D2.
I mean, I know how important _file extensions_ are, but could I get some kind of response on this?
Ok. I'll shut up already. :) Walter, if you were thinking to respond to another one of my inane posts about file extensions -- don't. Respond to Jarret here instead. Please. --bb
Feb 28 2008