Fell in love with Scala
I was a hard core JAVA developer in both my professional and learning journey, but recently for a reason i have started working with Scala and fell in love with it for the following so far.
- Semicolons - In Scala its not mandatory to have semicolons at end of the line
- Variable declarations - Scala allows you to decide whether a variable is immutable (read-only) or not (readwrite) when you declare itself.
- Ranges - Sometimes we need a sequence of numbers from some start to finish, atleast for testing
- Future - It avoid lots of boilerplate code I use to write in JAVA when deal with Threads
- Scala capability of inferring data information
- Tuple Literals - How many times have you wanted to return two or more values from a method in JAVA?, this can be easily done with Tuple Literals without creating some structural class
- Option,Some and None - for avoiding nulls, which makes our code ugly in JAVA
- Sealed Classes - restricts creating sub classes for critical use cases
- Scala for comprehensions - Makes our code small, maintainable and more readable
- Lazy val - for avoiding init static methods