A simple new keyword today
It is not possible to illustrate its main function using Scastie, so if you would like to learn more you will have to read the description snippet below. I am sorry about that.
We are reusing a lot of feature we saw in the past for this SKB. Everything should look familiar except the new keyword
sealed is related to Object Oriented Programming and more specifically about inheritance.
sealed allows you to block inheritance if it is not within the same file. If you define a
abstract class ( it works for both the exact same way ), you will only be able to
trait within this file.
This is the reason why it is hard to illustrate it within Scastie since everything is just one worksheet.
It is very useful when you want to describe something which have finite options. We are going to learn more about a very specific use case in the next SKB.