Overriding Private

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon May 11 23:05:48 PDT 2009


dsimcha wrote:
> Is there any hack in D that will allow overriding of privacy settings on
> classes?  For example, I really need a feature that will force D to let me
> mess with the internals of a class that I have no control over from a
> subclass, effectively making private members protected.
> 
> I know this is a bad idea, yada yada yada, but I feel like a language that
> allows manual memory management, casting away immutable, and inline assembler
> should allow some backdoor to cast away private.  Is this anywhere?  If not,
> we should really consider including a cast(public) or something in the spirit
> that, ultimately, the programmer knows what he/she is doing and the language
> should treat the programmer like a consenting adult.

You frighten my hoagie.



More information about the Digitalmars-d mailing list