4 ms·
Functional programming isn't about eliminating state. You can't write programs without state. Functional programming is about eliminating hidden state changes
by chowells 11y ago
Functional programming isn't about eliminating state. You can't write programs without state. Functional programming is about eliminating hidden state changes.
State changes are fine! They just aren't allowed to be hidden.
Despite all that - I agree that move semantics are weird. He's got a point there.
- grabcocque 11y agoIn the presence of concurrency, shared mutable state is a disaster. There are two ways to fix this: 1) Make it not mutable 2) Make it not shared But these are still "state", so I'm not really sure what the hell the article is on about.
- oldmanjay 11y ago3) synchronize correctly, which is fraught in nearly all languages. Rust has some very nice facilities for this, however, that make shared mutable state very usable indeed.
- seanmcdirmid 11y agoIf you don't have shared mutable state or shared resources, then you don't really have concurrency. Concurrency is actually defined as this problem, as opposed to parallelism which is just about splitting up work.