Hacker News new | ask | show | jobs
by hajile 3293 days ago
Now that the browser isn't the primary target for dart, is there work going on to make threading possible?
3 comments

There are no plans to add multithreading to the platform.

Currently, we are not spending resources on parallel execution (with isolates), either. There are other easier features that have more impact.

Eventually, we will revisit this topic, and see if we can make things easier. Multithreading itself is extremely unlikely, but there are other ways we can make parallel execution better; for example with easier data sharing between isolates.

> There are other easier features that have more impact

Which features?

For example:

- better type promotion (`if (x is! A) throw "not A"; useAsA(x);`.

- Optional new/const.

- Allowing named arguments at any position at the call site.

These are all easier to specify and implement, and reach more users.

I have found isolates easy to work with and useful at scale (number of isolates close to the number of CPU cores), with much better experiences than multi-threaded JVM applications (with all of their locking and starvation issues).

I'd be happy to assist if you share details of what you are trying to achieve.

The web is still very much a top-tier target for Dart. Almost all of our current internal users are targeting the browser. So compilation to JS is and will continue to be critical for us.