3 ms·
It does seem that way. I can't really understand the value of that, typically we want our models to model reality and not lie to us.
by serve_yay 11y ago
It does seem that way. I can't really understand the value of that, typically we want our models to model reality and not lie to us.
- noelwelsh 11y agoImagine you have to organise a large group of people to do some complicated job. You give everyone very explicit instructions (computers are better at following instructions than people, but imagine that these people are good at this). Nobody does anything until you've finished giving instructions. Then you shout "go!" and everything happens. This is what we're doing here. We very explicitly separate our program into two times -- giving the instructions, and shouting "go!" (calling run). Before we shout "go!", substitution holds. Once we shout "go!" we don't give instructions any more. In Haskell you don't even call `run` -- the runtime does this for you. There is no Noble Lie. There is a time (a world if you like) where substitution holds. We assemble our program in this time / world. There is a time / world where the program is run. We don't construct the program in this world. (This may sound restrictive, but it isn't.) Play with the code. The example is straightforward and easy to extend.