Two ZIO, Scala CLI, and Scala 3 examples
Briefly

ZIOAppDefault is the ZIO interpreter. In Scala 2, an application starts with:object Hello extends App where App is a type that's provided by the Scala SDK. But when using ZIO, you extend ZIOAppDefault instead, and its interpreter runs your application.
When you create a run function inside a ZIOAppDefault object, that function is where your application starts running. So in this example, run is invoked by ZIOAppDefault, and it calls Console.printLine. (Note that Console is provided by the zio.Console import statement.)
ZIO is a high-performance library, and Scala/ZIO applications are compiled to run on the JVM, and power huge websites and applications like Caesars and many others. This is where the action starts, with a run function you define.
Read at Alvinalexander
[
|
]