2 ms·
More formally speaking, programming is a game, and a program is a strategy. Programming is a two-team alternating-play game, between Murphy et. al. on one side
by 082349872349872 3y ago
More formally speaking, programming is a game, and a program is a strategy.
Programming is a two-team alternating-play game, between Murphy et. al. on one side (the environment) and the program, as coached by Alyssa P. Hacker et. al. on the other side (the programmers), on the other side.
Sometimes the programmers have the initiative, and the environment must provide a value of product type (from which the programmers have already decided a choice [a sum] of elements to keep).
Sometimes the environment has the initiative, so it may choose a play from a sum type, and if the programmers wanted to play a winning strategy, they must have provided a product of responses, so that no matter which summand the environment plays, the program has a suitable response.
When no further moves are possible, the game ends.
At this point, if the program has successfully produced quod erat faciendum, the programmers win. Otherwise (in some cases something else has been produced, in others the game has deadlocked) the environment wins.