Behind the Scenes - What the Scala Script Runner Does
When the Slang script runner is launched to execute a script, it delegates the task to the standard Scala command-line tool with Slang-specific settings (e.g., the Slang compiler plugin for Scala and other Scala compiler options). Scala then proceeds to compile the script file into a temporary jar file (as well as any Scala source files defined in the source path, which defaults to the directory of the script; additional source paths can be specified as an option to the script runner). It then calls the Java to execute the compiled code in the jar file.