4 ms·
Sorry to break your model but FP has nothing to do with not having a time component. You can write operations over "space" some_container |> map ( item -> i
by injidup 5y ago
Sorry to break your model but FP has nothing to do with not having a time component. You can write operations over "space"
some_container |> map ( item -> item + 1 )
or write operations over "time"
some_event_sequence |> map ( item -> item + 1 )
both are functional programming.
- kortex 5y agoI think that is exactly the point. The container has no notion of time. You have (container0, the_world0).map(operation) = (container1, the_world1) So it is completely symmetric with respect to time. If you don't do any side effects, then the_world "cancels out". How you decide to partition the container and the rest of the world determines how it behaves, state/time/IO/side effects. But there is no a priori notion of time. Contrast with OOP or structured imperative programming, where every object/field/register has state, and that state implicitly is a variable through time. The time is "baked in".