|
|
|
|
|
by jamescostian
3589 days ago
|
|
1. There are two built-in solutions to this (as well as a slew of other solutions in modules), the cluster module and the child process module: https://nodejs.org/api/cluster.html and https://nodejs.org/api/child_process.html 2. JS's duck typing is thought to be a "feature" to some and a
"bug" to others, so if you think it's a bug, use TypeScript or Flow. They'll give you "reasonable type system[s]" 3. Nice opinion |
|
Process spawning and threading are two different but related mechanisms. The former is much more expensive and hard to use with optimization techniques like pooling. It also forces message passing for IPC rather than shared memory.
> 2. JS's duck typing is thought to be a "feature" to some and a "bug" to others, so if you think it's a bug, use TypeScript or Flow. They'll give you "reasonable type system[s]"
Nothing that transcompiles into JavaScript can fix JavaScript's lack of a native integer.