Break OO privacy: Difference between revisions

m
Line 643:
=={{header|Julia}}==
 
Julia's object model is one of structs which contain data and methods which are just functions using those structs, with multiple dispatch, rather than object methods, used to distinguish similarly named calls for different object types. Julia does not therefore enforce any private fields in its structures, since, except for constructors, it does not distinguish object methods from other functions. If private fields or methods are actually needed they can be kept from view by placing them inside a module which iscannot notbe directly accessed by user code. In that case, thesuch useras canin then breaka module level privacy by explicitly importingwithin thata module.
 
=={{header|Kotlin}}==
4,107

edits