Private and protected attributes in OOP

As others in this thread have said, Julia is not an object oriented language, so to write good Julia code you will eventually need to change the way that you structure your code.

Specifically private/protected fields can often be approximated with closures (but note that nothing is completely private in Julia, as far as I know, internal fields in closures can still be accessed).

This is my comment in a similar thread:

1 Like