By knoldus
via blog.knoldus.com
Published: Nov 22 2012 / 09:06
The ScalaKnol series attempts to share a nugget of Scala wisdom every few days or sometimes few times a day. Keep tuned. Today we would look at the Uniform Access Principle. The principle states that the client code or the calling code should not be affected by the decision to implement an attribute as a field or a method. Hence essentially irrespective of whether the attribute is defined with a val or a def, the calling client should be agnostic of the same. For example, if we have a class like
Tweet
SaveShareSend
Tags: java, open source, other languages
Add your comment