3 ms·
> The idea of "mostly functional programming" is unfeasible. It is impossible to make imperative programming languages safer by only partially removing implicit
by asplake 3y ago
> The idea of "mostly functional programming" is unfeasible. It is impossible to make imperative programming languages safer by only partially removing implicit side effects.
Except that people do it all the time, and they find it safer than not doing it.
- jt2190 3y agoIf I understand the article correctly, even if the programmer is reasoning and coding functionally in an imperative language, the compiler can not assert that the code is safe for concurrency and parallelism. (You may find you get other benefits from programming functionally.)
- phoe-krk 3y agoRust seems to have solved some of this with its borrow checking semantics that automatically prove which parts of code are automatically paralellizable without running into issues like simple data races - or am I wrong?
- kibwen 3y agoThe Rust compiler doesn't automatically parallelize, but all single-threaded Rust code upholds the invariants necessary to be thread-safe, so it's relatively easy (and sometimes entirely trivial) to turn a single-threaded program into a parallel program.