The current editor only allows to use Scala 2 whereas Scala 3 is out. There’s also Scala scripts which allows us to write small code without using an object extending App or a main method:
example.sc:
println("Hello World") //No object needed
My proposal is to:
Add Scala 3 support
Use the Scala Script format
This would allow us to focus on what’s important and in CoC be competitive in shortest.
Perhaps asking for a language upgrade but it seems they have frozen version for JVM bases languages, using JVM 1.8 (not updated in the languages update of Avril 2021)
According to the FAQ, it seems that the scala version is 2.13.5
This is actually the issue: it is not the latest major version (Scala 3) with its improvements nor the Scala Script (also named Scala Worksheet) which is official and far more suited to coding challenges than App object or main method.
The JVM version in itself is fine for both JVM languages (which often depend on Java 8 in their latest versions) and even Java since Java 9+ features do not concern this kind of small programs.
But be patient, we don’t know the politic of CG for updating language (if they had one), and I say I have the impression they have frozen the version of all JVM related language.
(or change the category of the topic to be in “programming language”)