4 comments

[ 3.2 ms ] story [ 22.3 ms ] thread
This is misleading, the author is not running "Scala on Tessel 2", but rather "Compiling Scala to Javascript for Tessel 2"
Author here. Would you say that you are not "running Scala" on your laptop or server because your Scala code is compiled to Java bytecode first, then interpreted and JITted by the JVM? Of course not.

Running Scala compiled to JavaScript and then interpreted and JITted by V8 is "running Scala" as much as it in the case of the JVM. There is no fundamental difference.

This said, the misunderstanding might come from unfamiliarity with Scala.js. It is a compiler plugin for Scala which, instead of producing Java bytecode, produces JavaScript. You can learn about Scala.js more here:

    https://www.scala-js.org/
I hope this helps clarify things a bit!
I spend about 30% of my time at work in Scala, I'm very familiar. I'm also familiar with Scala.js, though I don't use it.

Normally you don't need to clarify that Scala is interpreted to Java as that is the expected behaviour.

Scala and many other languages get compiled to javascript, but I think most people don't expect that to say 'Scala in your browser' or similar because that is not what is happening.

So in some ways your are proving my point by saying that Scala is not running on the Tessel.

But really, probably not worth all the effort either of us are putting into this. :)

You can write programs checked by the Scala compiler than run on the Tessel 2. I see no way how this is any less "running Scala" than when I run a jar generated by scalac on an EC2 instance.