V=C3=A0o 10:13:11 UTC+7 Th=E1=BB=A9 n=C4=83m, ng=C3=A0y 24 th=C3=A1ng t=C6= =B0 n=C4=83m 2014, Paul Rubin =C4=91=C3=A3 vi=E1=BA=BFt:
solidius4747@gmail.com writes:
I has always been thinking this, but I need a confirmation: The purpose of = functional programming is to make written program becomes a mathematical pr= oof. Once a program is correctly written, it is "proved" and is expected to=
work the same in any environment. This is why in FP, immutable is needed, = otherwise there's no guarantee for the correctness of the "proof", because = state changes can introduce unexpected behaviors.
Am I correct on the basis of Functional Programming?
In article <>, solidius4747@gmail.com wrote:
V=C3=A0o 10:13:11 UTC+7 Th=E1=BB=A9 n=C4=83m, ng=C3=A0y 24 th=C3=A1ng t=C6= >> =B0 n=C4=83m 2014, Paul Rubin =C4=91=C3=A3 vi=E1=BA=BFt:
solidius4747@gmail.com writes:
I has always been thinking this, but I need a confirmation: The purpose of = >> functional programming is to make written program becomes a mathematical pr= >> oof. Once a program is correctly written, it is "proved" and is expected to= >> work the same in any environment. This is why in FP, immutable is needed, = >> otherwise there's no guarantee for the correctness of the "proof", because = >> state changes can introduce unexpected behaviors.
Am I correct on the basis of Functional Programming?
Users of Haskell wouldn't know how to or want to
'formally prove correctness'.
If you read their hand-waiving carefully, you can interpret
it to mean: "because it feels nice".
A massive economy of effort [in maintenance, which is
important] is available from 'piping'.
[functional means 'give input & accept output' = piping]
Eg. if you've got a multi-stage process like:--
output textfile |
translate "US" to "you ess" |
delete <crap> | delete <crap2> |
input to TestToSpeech |
translate *.wav to *.mp3 |
store to playing device
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 69:38:59 |
Calls: | 6,915 |
Files: | 12,380 |
Messages: | 5,431,960 |