ScalaPractice

Hi there! ScalaPractice repo has been created with one thing in mind, for implementing and successfully testing features of Scala 3, please note that I couldn't find a befitting tutorial for Scala3 (most of the ones I could find were on Scala2 and older and hence incompatible with my Scala3 compiler). So whatever is in these code lines is fresh from the Scala3 developers' official documentation. I've posted a link of the same in the end of this file.

  • This repo contains 3 major files:

  • Test.scala: this is an actively updated file where I try to implement various features of Scala3 (mostly basic) in the form of callable functions. Consider it a playground to test new features or just to run Scala3 code to see it in action.

  • Classes.scala: This is a small scale implementation of the OO Model of Scala, traits and classes have been used to create real world scenarios and business logic defined for the same. It can be used by beginners to understand the OO concepts first-hand in Scala.

  • Vehicles.scala: This is a more complex implementation of the OO Model, multiple traits are inherited by two different classes and they are exhibiting their own types of behaviors based on their individual natures. This is a great example of replicating real world scenarios in programing. In future editions I plan to streamline the two child classes even more to make the object creation dynamic.

Disclaimer:

The code herein has been developed in Scala 3 and uses many features which might not be compatible with older scala versions.

Scala 3 Documentation available at: https://docs.scala-lang.org/scala3/new-in-scala3.html

Author: Fardeen Ahmad Khan mail me at: fardeenahmadkhan786@gmail.com