Re:Java Feature Spotlight: Text Blocks
by t0astbread on Friday May 01, 2020 @10:27AM
(#23042289)
You can do parallel computing in Node and the browser using workers. Also what features do you mean that "envy Java"?
[ Parent
| on HN ]
Compared to any language that has threads, workers are a usability nightmare and come with a million caveats.
(For example they have major limitations in Electron, which is one place where having threads would be very convenient. The current best practice is to spin up an entire new hidden browserwindow instead which is frankly insane.)
We offload anything that would need a thread to another process on the JVM for electron. I know a few other projects offload to a GO process.
Re:Java Feature Spotlight: Text Blocks
by nickbauman on Friday May 01, 2020 @10:40AM
(#23042414)
workers are clunky compared to how parallel/async computing is implemented in Clojure, for example.
Re:Java Feature Spotlight: Text Blocks
by nickbauman on Friday May 01, 2020 @10:36AM
(#23042381)
static typing seems to be on the horizon (facepalm)
Re:Java Feature Spotlight: Text Blocks
by t0astbread on Friday May 01, 2020 @11:26PM
(#23048891)
Well yeah, Microsoft developed TypeScript to resemble C#'s type system so naturally it will look a bit like Java? TS is far from being the de-facto standard though (maybe because it's centred around OOP?)