On Fri, Sep 2, 2016 at 10:15 AM, ketmar via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> On Friday, 2 September 2016 at 07:46:30 UTC, Rory McGuire wrote:
> actually, from my PoV solution is supereasy: just remove ALL visibility
> restrictions for traits. and i mean all. allMembers should return all
> members, getMember should allow to access *any* existing member without
> annoying messages. it is up to programmer to insert getProtection checks if
> he needs it.
> traits is a low-level feature by definition, and doesn't meant to be used
> directly (we have std.traits wrappers for that), so i want D devs to stop
> making our, low-level coders, life harder than it is now. ;-)
> D devs just should draw the line between __traits and std.traits. first
> sould be inherently unsafe, allow *everything* and impose as little
> restrictions as it is possible (note: *as* *possible*, not *as* *sane* --
> all kind of insanity should be allowed, if it is possible). then,
> std.traits wrappers should use __traits to build *safe* things (declaring
> that @trusted in the end).

May our benevolent dictators agree with you :D (I do).

If a developer is willing to research the language definition and discover
__traits, you should be ready for unprotected intimacy with the hardware of
your choice. And if someone just copy pastes code with __traits in it they
should know that "__" in a symbol is a "WARNING here be dragons"

Reply via email to