Scala provides different ways to share common data between the files. In a simplified way, a class is often used to share the values by storing them in methods in that class. But those methods are statically typed. What we mean by statically typed ?
Here we mean by statically typed, is that a class having a method declared and used everywhere we want to assign information and fetch from it. Now if there is a requirement to have a unique method every time we store some information in and fetch.
As Scala provides the dynamic typing, we have the following profits,
- Code written in Scala will be more understandable due to well formed method names and arguments,
- Dynamic typing will create the method at the execution time, we need not to type it statically,
- Need not to create many variables, methods to store or calculate some common calculations with…
View original post 519 more words