-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Scala Lang #235
Comments
Note that as for Python there are two major Scala versions (2 and 3); but unlike Python the newer one is very recent (less than two years old). Since Scala 3 is still evolving very quickly, if we were to add this language I think it would be best to rely on version 2 which is actively maintained but will not benefit from any new language features. |
I'd add Scala 3. It's been around for enough time (imo) that it's plenty stable enough. However, we have the same problem as Kotlin: It takes >=5s to run a program. |
Scastie, the official Scala sandbox running on the web, have managed to do it for both versions (<1s on a cold start). We should study how they did it and decide how to proceed (source code). |
Yes, this is to be expected on a "regular" environment. Part of that time is spent compiling the code, and the other part starting up the program (slowed down by the standard library). |
The issue is also that on a local machine, the programs run on the JVM, which tends to be very bloated and slow to boot up |
Unless I am mistaken I don't think the JVM is the main issue. According to Scastie:
I am currently checking how they implement this "isolated JVM". |
I was looking into this and noticed that even on Scastie, it's technically slow, because on the first run, it starts up sbt and takes over 5 seconds. On subsequent runs, it's fast because it uses the same running sbt instance. |
Is it? |
I don't know but I've tried several times and on each load, it takes a while to start up. Using Scala 2 is quite a bit faster though. |
Maybe ditch sbt and use ammonite instead. I've used this a few times and I think it'll be perfect for this usecase |
Here's the language's website https://www.scala-lang.org/
The text was updated successfully, but these errors were encountered: