It is quite evident what SOLID principles mean for class typed object oriented languages like Java. However, what do they mean for hybrid languages like Scala which merge the Object oriented and functional approaches. In this KnolX session, we tried to decipher what SOLID principles meant for Scala. Though much of what we know about them can be applied to Scala if we code in the Object oriented way with Scala. However, once we are in the functional boundaries then some of the principles like Liskov Substitution, Open Closed Principle have weak relevance in functional languages since these principles are based on inheritance. The Dependency inversion principle is also somewhat less relevant because functions can be passed in functional languages instead of dynamic binding. (Though I still feel that with injection concepts in Scala like the Cake Pattern, we get only half the job done and I miss the dynamic aspect of inject, but may be that is another discussion).
For now, enjoy the KnolX session slides and as always send your feedback to hello@knoldus.com
1 thought on “SOLID Principles with Scala1 min read”
Comments are closed.