Lack of isPublic isPrivate isProtected compile time reflection features

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Mon Jul 9 20:30:00 UTC 2018


On 07/09/2018 05:24 AM, Basile B. wrote:
> 
> By the way i forgot to mention something : it would not necessarily be a 
> good idea to put wrappers named isPrivate(), isPublic(), etc. in 
> std.traits because if the wrappers are instantiated in std.traits they 
> could not work correctly because the symbol that they would inspect 
> would not be accessible (since located elsewhere)... I'm not 100% sure 
> if __traits(getProtection) is affected but the problem described is 
> known as a problem when doing introspection with getMember for example.

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.


More information about the Digitalmars-d mailing list