top | item 46407939

(no title)

thinkingkong | 2 months ago

Well… if you look at pure functions without ant state then thats a whole class of computing you can refer to. The problem is that its not efficient to calculate state from arguments for everything. We end up saving to disk, writing packets over the network, etc. In a purely theoretical environment you could avoid state, but the real world imposes constraints that you need to operate within or between.

Additionally, depending how deep down you go, theres state stored somewhere to calculate against. Vues are stored in some kind of register and theyre passed into operations with a target register as an additional argument.

discuss

order

SpicyG|2 months ago

I agree, and I think this is where the distinction matters. I’m not claiming that state disappears, or that computation can be purely stateless all the way down. There is always state somewhere - registers, buffers, disks, networks. The question is where authority lives and whether correctness depends on reconstructing history. The inefficiency you point out is real: recomputing everything from arguments is often worse than persisting state. That’s why the pattern I’m aiming at isn’t “no state,” but no implicit, negotiated state. State can exist, be large, and even be shared — but it should be explicit, bounded, and verifiable, not something the system has to infer or reconcile in order to proceed. At the lowest levels, yes, registers hold values and operations mutate targets. But those mutations are local, immediate, and enforced by hardware invariants. Problems tend to appear higher up when systems start treating historical state as narrative, as something to reason about, merge, or explain, rather than as input with strict admissibility rules. So I see this less as a theoretical purity claim and more as a placement problem: push state to places where enforcement is cheap and local, and keep it out of places where it turns into coordination and recovery logic.