Hacker News new | past | comments | ask | show | jobs | submit login

I don’t really see the usefulness of this.

If you write your program this way, how does it interact with the environment (e.g user input, output, network…)? Something is missing.

And if it doesn’t interact with the environment, then your program is just one big pure function, in which case you get all of the benefits in OP’s proposal anyway, without having to worry about transforming old state to new state, you just gotta transform input to output.




> If you write your program this way, how does it interact with the environment (e.g user input, output, network…)?

The answer is, of course, monads[0]. Probably.

[0] https://dl.acm.org/doi/10.1145/158511.158524


Author here. In Backus's paper, the next-state function accepts a (state, input) tuple and returns a (state, output) tuple.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: