Lack of isPublic isPrivate isProtected compile time reflection features
12345swordy
alexanderheistermann at gmail.com
Tue Jul 10 00:07:29 UTC 2018
On Monday, 9 July 2018 at 21:25:03 UTC, Jonathan M Davis wrote:
> On Monday, 9 July 2018 14:30:00 MDT Nick Sabalausky (Abscissa)
> via Digitalmars-d wrote:
>> On 07/09/2018 05:24 AM, Basile B. wrote:
>> > [...]
>>
>> Isn't it pretty much standard in most languages for reflection
>> to bypass access privileges? I seem to remember Java/C# being
>> that way, but then, it's been a long time.
>
> D currently does not. As I understand it, after the access
> level stuff was last reworked so that private stuff didn't
> affect function overloading, it was decided that we needed to
> change it so that it did allow code introspection to examine
> private symbols (not necessarily to call anything - I'm not
> sure that that was decided one way or the other), but AFAIK, no
> work has actually been done towards fixing it. However, given
> that Andrei has been working on a way to provide type
> information as a set of structs in order to simplify and
> standardize accessing it, I expect that fixes for a number of
> issues related to type introspection will finally end up
> getting done, because his stuff won't work otherwise.
>
> - Jonathan M Davis
Why as a set of structs? Is this set of structs generated at
compile time or at runtime? Preferably I want them both compile
time and runtime reflection. (Yes I know there is a library
regarding runtime reflection, but you have to modfy your classes
in order to achieve this functionality)
-Alexander
More information about the Digitalmars-d
mailing list