News for hackers. Stuff that matters.
Re:Total Functional Programming (2004) [pdf] by llm_trw on Thursday March 07, 2024 @08:08AM (#39628602)
Because a stateless program can execute in only one way for any given inputs.

A stateful program can execute in 2^n different ways for each bit of state for any given inputs.

Re:Total Functional Programming (2004) [pdf] by mrkeen on Thursday March 07, 2024 @01:34PM (#39632811)
> 2^n

If it only computes from an expression to an expression. I think the bound might be higher if you use imperative statements (/effects).

You can fill the whole 2^n output space by calling random(). But in addition to that, the program might also delete an arbitrary file, or deadlock, etc.