53 sats \ 2 replies \ @zuspotirko OP 23 Jun 2023 \ parent \ on: What's the Future of Programming Languages in Your Opinion? tech
Wdym? Side effect as opposed to return values? I'd argue that depending on the context this is just what heppend when dependencies/frameworks get more powerful and do more stuff
Side effects as opposed to what are colloquially called pure functions.
reply
Pure functions have no state. Side effects are caused by hidden state. Visible state only needs concurrency locking, mutex and atomic. If you can't have state then what is the application going to look like? Configuration? Nah, we don't need no stinkin state.
Functional gave us functions as variables. The rest is obvious, but has the wrong focus. It shouldn't be a remarkable comment to say hidden state causes nondeterministic execution. I think determinism is the key not the 'cleanliness'. Systems have state, and need state. Systems are usually at least two independent threads, thus synchronisation is required.
Functional theory was born in a Von Neumann machine and will stay there because this ideal serial event stream is irrelevant to real world applications.
reply