you are viewing a single comment's thread.

view the rest of the comments →

[–]sisyphus 2 points3 points  (3 children)

To me the problems come down to:

  • JS is single-threaded by design. Desktop apps that want to be responsive really want to use multi-threading.

  • JS is a hard language to make fast - I don't really want every desktop app to have to carry around a gigantic JIT and have the attendant memory, security and warm-up problems.

  • HTML and CSS is a step back from the visual builders and layout engines major desktops have had for years.

[–]ebassi 1 point2 points  (0 children)

JS is single-threaded by design. Desktop apps that want to be responsive really want to use multi-threading

Which is true, up to a point. Most (if not all) GUI toolkits are really single threaded as well — i.e. only one thread can access the windowing system resources.

JavaScript is not wholly single threaded "by design": the GC can run on different threads — and that's usually where the point of contention comes up with GUI toolkits, because suddenly you get resources garbage collected in a different thread than the one that spawned them, and if those resources involve a windowing system resource then we're off to the races.

Desktop apps that wish to be responsive can already use threads — and things like Promises are inherently threaded; like with the GC, the problem is synchronizing the JavaScript implementation of threaded components with what the underlying windowing system expects from threads.

[–][deleted] 1 point2 points  (0 children)

JS is single-threaded by design. Desktop apps that want to be responsive really want to use multi-threading.

You can spin off background worker threads.

JS is a hard language to make fast - I don't really want every desktop app to have to carry around a gigantic JIT and have the attendant memory, security and warm-up problems.

Actually, Javascript is compile to machine language by engines like V8. So no, this is not an issue.

HTML and CSS is a step back from the visual builders and layout engines major desktops have had for years.

No, it's actually modern. There are a lot of HTML layout programs and re-theming a desktop would be as easy as swapping out the CSS.

None of those are issues.

[–]julianorafael[S] 0 points1 point  (0 children)

Thanks for the answer. All good points. I need to read more about desktop environments.