Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are Scala's future platform concerns people should be prepared for?

At the moment Scala runs only on the JVM, with an outdated implementation for the CLR.

But there are some voices at the moment, that Microsoft is interested funding an up-to-date Scala port for .NET.

Considering the lack of any plan or oversight at Oracle's side what to do with Java/the JVM/the ecosystem, how can a Scala developer be prepared that in the end there might be no decent platform left to run Scala on?

Are there any plans to have some "independent" implementation of a Scala VM in the future, which maps Scala's feature to some bytecode/VM, instead of having to live with all these legacy bugs in current VM implementations (no generics, covariant arrays, weird annotations, no tail calls etc.)?

like image 640
soc Avatar asked Jul 08 '10 16:07

soc


People also ask

What Future sequence does?

This Future. sequence() function converts a list of Futures into a single Future that means collections of Futures into a single Future. In simple words, List[Future[T]] ======> Future[List[T]] . It is also known as composing Futures.

How do you handle Future Scala?

Handle the result of a future with methods like onComplete , or combinator methods like map , flatMap , filter , andThen , etc. The value in a Future is always an instance of one of the Try types: Success or Failure.

What is Future and promise in Scala?

The Promise is a writable, single-assignment container that completes a Future. The Promise is similar to the Future. However, the Future is about the read-side of an asynchronous operation, while the Promise is about the write-side.

What is ExecutionContext Scala?

An ExecutionContext can execute program logic asynchronously, typically but not necessarily on a thread pool. A general purpose ExecutionContext must be asynchronous in executing any Runnable that is passed into its execute -method.


2 Answers

Here's another view regarding the VM:

While not really Sun's brightest moment if you look the whole picture, slapping the GPL license on JDK/related things has actually caused this wonderful situation where the whole JVM platform is completely independent from Oracle. I mean, the virtual machine isn't tied to Java, the garbage collectors aren't tied to Java and most importantly the Java programmers aren't really tied to Java and thus Oracle.

As a Java programmer, I'd say we won - if Oracle decides to deprecate everything in Java world in hopes of bigger profits, we can just grab the VM and a modern language such as Scala and let Larry Ellison sail to sunset in his yacht for all we care.

like image 187
Esko Avatar answered Sep 23 '22 03:09

Esko


The current implementation of Scala is very much focused on the JVM. Much in the Scala library depends on classes in the Java standard library and Java classes are also exposed to user programs.

If there are going to be Scala implementations on other platforms such as the CLR or LLVM, then programs written for the current Java-oriented Scala implementation will not be automatically compatible with those other implementations (unless those implementations go to great lengths to support the classes available in Java).

I agree with Randall that the JVM is not going to disappear anytime soon; it's probably the most succesful and widespread virtual machine platform, deployed on billions of devices, from smartcards and handheld devices to the biggest servers. In fact, the Java programming language might disappear much sooner than the JVM itself. There is no reason to fear for the disappearance of the JVM in the forseeable future.

And even in the unlikely case that it does - does it really matter? You'd still be able to program in your favorite programming language Scala, on one of the other platforms.

like image 35
Jesper Avatar answered Sep 23 '22 03:09

Jesper