Hacker News new | ask | show | jobs
by rubiquity 4049 days ago
> Javascript has it (in its own, somewhat broken way).

No it doesn't. Also OCaml is from a pre-multicore era. Even Erlang wasn't multicore from the start, SMP was added in 2005.

1 comments

Webworkers

And I don't really care if it is from an other era - C has threads (as a library but still).

> Webworkers

JavaScript Webworkers can't interact with the page at all, they can only send messages around. This implementation detail leads me to believe the browser is probably doing little more than instantiating another JavaScript interpreter and handling IPC/synchronization for you. This is a far cry from true parallelism.

Further illustrating that JavaScript doesn't have parallelism is that Node.js isn't parallel and in fact encourages its users to use process forking instead.

> And I don't really care if it is from an other era - C has threads (as a library but still).

OCaml has threads. It just doesn't have parallel threads (yet). Threads existed before CPU parallelism so of course C and a bunch of other pre-CPU parallelism languages have them. The difference is C doesn't have a GIL whereas OCaml does/did.