Re:Why Functional Programming Matters (1984) [pdf]
by kazinator on Thursday December 08, 2016 @06:26PM
(#13135307)
Well, C brings ... functional programming over assembly, right? Look, calculation with machine words, but without side effects:
int x = 42;
int y = x / 2;
double z = sqrt(x*x + y*y);
return 1 + z;
We're just binding fresh variables, and nesting expressions that evaluate terms and return results. No assignment anywhere.Yes, functional programming matters. It lets you add two things together in C without worrying about allocating a destination operand for the result, whose clobbering won't affect anything anywhere else.
This sort of thing in turn makes it a heck of a lot easier to write OS schedulers, drivers, memory managers, codecs, ray tracers, database engines, ...
http://fsharpforfunandprofit.com/
In particular this example convinced me I'm missing out on something
http://fsharpforfunandprofit.com/posts/designing-for-correct...