On 2016-08-31 01:08, Martin Nowak wrote:

Well there was reasoning to choose that solution instead of the other
(https://github.com/dlang/dmd/pull/6078) and the fact that private
members aren't accessible (set/get) is a good indication that nobody
needs this.
Adding an unsafe facility to access private members is a separate
problem, but please see the changelog for how to achieve this already by
mixing in templates.

In addition to using .tupleof to bypass protection it's possible to return a pointer to the symbol to bypass protection as well, fixing that would require some serious flow analysis. It's also possible to inspect the symbol table to access private symbols at runtime.

--
/Jacob Carlborg

Reply via email to