Apart from serious performance problems, Scala is a very powerful language. Therefore I am now using it frequently for scripted tasks inside Bash. Is there a way to just execute a *.scala file exactly the way I can do with Python files? As far as I know, Python uses bytecode to execute programs, exactly like the JVM does. However, there is not anything called pythonc (like scalac or javac) I need to call in order to accomplish this. Hence I expect Scala to be able to act in a similar manner.
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
|
I don't use python, but in Scala, the most scripty thing I can do is this:
However, afterwards, I don't have visual feedback in the bash, so I have to call 'clear'. But there is no problem in writing a script and executing that:
Then, there aren't issues with the shell. With an enclosing class, the code wouldn't be executed:
But with instatiating a class, you can execute code in it, without using the wellknown (hope so) 'main' way:
|
||||
|