Private visible?
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Fri Jul 14 03:06:03 PDT 2006
Walter Bright wrote:
> Ivan Senji wrote:
>> Various 'poisoning' techniques sound a lot like C++ to me. There one
>> can make classes that can not be constructed, can not be inherited
>> from, can not be passed by value, cannot be allocated on stack and
>> many different things by making something that is private. But are
>> these techniques realistic or even possible in D?
>
> Sometimes it is valuable to be able to say "you can't do this operation
> with this type". I don't see why this ability should be restricted to C++.
OK, for a type, but would it be inconsistent if private was handled
different in class and module level?
I didn't mean it should be restricted to C++ but was rather wondering if
there are other/better ways in D?
More information about the Digitalmars-d
mailing list