The Sapphire Language: getting and setting instance variables
Please only leave comments relating directly to this article.
Do not leave technical questions or general questions.
If you have any technical questions, we request that you join the forum in order to post them: http://www.sapphiresteel.com/forum/
Actually, it doesn’t break encapsulation - it just makes instance variable accessors public by default. It’s just that the get/set methods are defined by default to be public. This is the current behaviour, but you can change this. We’ve defined a technique of altering this behaviour using interfaces (picked up from Object Oriented Encapulation or OOE) which I’ll describe next week.
I haven’t had a look at Lua (yet) - thanks for the pointer.
Dermot

