What do you think about the differences between private and strict private? Let's discuss! Don’t forget to share this with your fellow Pascal programmers. 😊
@daShare7 күн бұрын
I switched to using strict private in my classes by default a few years ago. It's helped prevent accidental direct access of things from other classes.
@hgrabows5 күн бұрын
I just tried this in Dart and it has the same behavior. Any function, even bare functions or ones in classes with no inheritance have access to private methods/members/properties of classes defined in the same file. I don't think about the private members that way and wouldn't use them that way but that is interesting.
@silvercoder705 күн бұрын
Hi. My understanding is that it is object pascal way of adding friendship - that idea from c++. But it can catch the beginner off guard if not aware of this.