[Issue 1223] .tupleof tries to access protected members

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 27 16:37:14 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=1223

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |andrej.mitrovich at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to Andrei Alexandrescu from comment #1)
> I think tupleof should actually access all nonstatic members, or that at
> least there should be a way to access all members. It's essentially a way to
> unencapsulate objects for e.g. serialization and introspection purposes.

This is an ancient issue by now (D1), but I don't think we should change
.tupleof in any case. Typically low-level code uses .tupleof, for example it
might use it to send a data structure over the network and you wouldn't want to
lose private members in the process. :)

I think this is fair to close as wontfix.

--


More information about the Digitalmars-d-bugs mailing list