digitalmars.D - d- encapsulation
- arun s (2/2) Mar 13 2007 i want to know how the encapsulation rules works in D.
- BCS (4/10) Mar 13 2007 If the two classes are in the same file this will happen (private only l...
- Tomas Lindquist Olsen (2/6) Mar 13 2007 You should post some code for decent replies.
- Kyle Furlong (3/11) Mar 13 2007 Formatting, punctuation, capitalization, spelling, and grammar would all...
- janderson (3/16) Mar 14 2007 Really? Then I feel sorry for people who's primary language is not Engl...
i want to know how the encapsulation rules works in D. i have made a attribute as private in the class, but am able to access this attribute directly from the class instance...can any body give reason for this???
Mar 13 2007
Reply to arun,i want to know how the encapsulation rules works in D. i have made a attribute as private in the class, but am able to access this attribute directly from the class instance...can any body give reason for this???If the two classes are in the same file this will happen (private only limits access to the module). If they are in different modules than this would be a bug, however IIRC there are a few bugs of this type around.
Mar 13 2007
arun s wrote:i want to know how the encapsulation rules works in D. i have made a attribute as private in the class, but am able to access this attribute directly from the class instance...can any body give reason for this???You should post some code for decent replies.
Mar 13 2007
Tomas Lindquist Olsen wrote:arun s wrote:Formatting, punctuation, capitalization, spelling, and grammar would all go a long way toward getting decent replies as well.i want to know how the encapsulation rules works in D. i have made a attribute as private in the class, but am able to access this attribute directly from the class instance...can any body give reason for this???You should post some code for decent replies.
Mar 13 2007
Kyle Furlong wrote:Tomas Lindquist Olsen wrote:Really? Then I feel sorry for people who's primary language is not English. -Joelarun s wrote:Formatting, punctuation, capitalization, spelling, and grammar would all go a long way toward getting decent replies as well.i want to know how the encapsulation rules works in D. i have made a attribute as private in the class, but am able to access this attribute directly from the class instance...can any body give reason for this???You should post some code for decent replies.
Mar 14 2007