As I mentioned in a recent thread, the Object Oriented way of programming may be regarded as arising from the same motives as Structured Programming: to streamline code while making it more readable, reusable and reliable.
If a machine algorithm is able to prove a program was mathematically correct in some way, so much the better. FP aims to do better that OOP in that regard.
""" Structured Programming was an early attempt to get untangled, or less tangled.
I'd say the mathematical concept of "a function" plays a similar integrating role in helping us think more reliably in mathematical terms.
Although at first one might think inputs and outputs have to be "single variables", in fact any combination of inputs may be thought of as a "single variable", just as what's returned may be a grab bag of interesting objects within a single object -- and yet it's not a relation and f(x) --> y notation still applies.
Consider the Mandelbrot set: values on the complex plane that converge for z = z**2 + C: a function that feeds back into itself, starting with z = 0 + 0j and C = some point. M(x, y) -> color is a function in the mathematical sense, and it may be programmed. The color is pegged to the resulting number's absolute value (its magnitude). Divergent values spiral out, but at varying rates, which informs color choices.
I've been showing simple fractal code in Python over on edu-sig, a Python community list:
On Sun, Mar 2, 2014 at 11:57 AM, Joe Niederberger <firstname.lastname@example.org>wrote:
> The Important Contributions by the ALGOL Effort: > http://heerdebeer.org/ALGOL/conclusion.html > > "ALGOL became founded on a theoretical basis of formal languages. Soon > research on formal languages, including programming languages, and on the > connection with other mathematical theories like automata theory was > started." > > cheers, > Joe N >