digitalmars.D - d- encapsulation
- arun s <1986.arun gmail.com> Mar 13 2007
- BCS <ao pathlink.com> Mar 13 2007
- Tomas Lindquist Olsen <tomas famolsen.dk> Mar 13 2007
- Kyle Furlong <kylefurlong gmail.com> Mar 13 2007
- janderson <askme me.com> Mar 14 2007
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: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.
Formatting, punctuation, capitalization, spelling, and grammar would all go a long way toward getting decent replies as well.
Mar 13 2007
Kyle Furlong wrote:Tomas Lindquist Olsen wrote: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.
Formatting, punctuation, capitalization, spelling, and grammar would all go a long way toward getting decent replies as well.
Really? Then I feel sorry for people who's primary language is not English. -Joel
Mar 14 2007









BCS <ao pathlink.com> 