Chris Knott
06/07/2019, 11:06 AMprogrammer 1: Ok... if x is less than 5, set y to 3
programmer 2: Ok... set y to -5, then if...
programmer 1: Hey what are you doing? I want y to be 3
programmer 2: No I just set it -5
...
Yeah, this is kind of chaotic but it's actually, in a way, very "natural" and "easy to understand". Not easy to solve, but very natural to see that it's difficult to solve.
Basically I think that mutating global variables are actually the most natural way for a human to understand procedures, and supposedly "clearer" methods like FP are only popular among people with very strong mathematical ability, who have also already internalized powerful abstraction abilities that they no longer realize are unnatural, and have also already experienced the difficulty of trying to understand parallelism with only their brains. These people welcome the unnatural constraints of FP with open arms. People coming to programming from the real world, do not (in my experience) welcome the constraints of FP at all.
It's very interesting to me that Dynamicland appears (from afar, I've never been there), in it's pursuit of a more natural and "humane" programming, to have basically gone completely the opposite direction to FP. As far as I can tell the entire room/operating system operates on a single massive global database.Will
06/07/2019, 3:36 PMChris Knott
06/07/2019, 3:52 PMChris Knott
06/07/2019, 3:56 PMGarth Goldwater
06/07/2019, 5:47 PMDuncan Cragg
06/07/2019, 7:21 PMthe real world [being], unquestionably, shared mutable stateand pure (non-Turing Complete, non-tail-recursive, fixed-point-seeking, finite-iterating) functions to transform between successive evolutions / mutations of bits of that state. I sometimes think both sides, FP-based thinkers and shared-state thinkers are blinded to the obvious.
Duncan Cragg
06/07/2019, 7:24 PMDuncan Cragg
06/07/2019, 7:35 PMHow do I program something that closes the door, then dead-bolts the door? How do I do that in a world where someone else wants to open the door and drive a robot through? This sort of thing requires ordering and locking across wishes, surely?
Duncan Cragg
06/07/2019, 7:36 PMChris Knott
06/07/2019, 7:42 PMDuncan Cragg
06/07/2019, 8:04 PMwtaysom
06/08/2019, 12:52 AM