On 1/18/19 6:36 PM, George Neuner wrote: > Historically, many computer language designers were mathematicians, and > they deliberately sought to distinguish "computer" functions from > "mathematical" functions. > > It has yet to work completely - witness the legions of newbies every > year who don't understand that computer arithmetic differs from the math > they were taught in school.
Ellen: I don't disagree with most of the points here, I just draw the opposite conclusion. Look at the example you selected: "compose". It is often the case that arbitrary procedures don't compose meaningfully, whereas procedures that represent functions always compose meaningfully. This is a hot topic among programmers these days. Maybe the person who wrote this documentation choose the word "function" for this reason? As a parent, I wish Javascript had adopted the word "procedure" as Scheme did. It is frustrating to try to teach your kids good mathematical intuition with the help of resources like Khan Academy, only to have the intuition undermined by conflicting lessons from the CS side of the curriculum. ----- George: Aren't you making my case here? The mathematicians actually have the same trouble with their components as we engineers! Stoy says, "a careful distinction is vital in the case of functions", admonishing us not to "confuse functions with the algorithms representing them." Weren't Schemers making this distinction with the word "procedure"? Should an engineering education sweep the distinction between the abstract and the concrete under the rug? It's useful to distinguish the mappings/functions/relationships that interest me from the toolbox of algorithms/procedures/languages/devices that I use to represent them. Consider: "This procedure perfectly captures our (finite) function". "This system is a compact realization of the function, but unstable for certain inputs. On the other hand, this system converges for all inputs, but has a long phase delay." "This (infinite) function is impossible to represent on a computer, but we can generate whatever finite portion you require." You can't even make these statements if you abolish the distinctions. Hence my astonishment that Racketeers, teaching experts, are stepping away from the word they inherited from Scheme. > The problem is that quite a lot of the talk about functional programming > is just marketing. So, are people gravitating away from the word "procedure" because "functional" is now being marketed? But seriously... > The languages can't live up to the promise of mathematical purity, ... etc. Nobody is looking to program a pure function devoid of effects. It's about making computation (including effects) understandable to people. The motivation behind functional programming (and most engineering discipline) is that humans can't really understand complex systems of effects very well, and so we try to look for components whose meanings compose. Functions are emblematic of that sort of composition--hence the name. Operating under this slogan, people have come up with several ways of composing effects, and we haven't seen the final chapter in that story. Computer scientists haven't quite broken down their field into the pieces that fit together nicely, but why discount the progress they are making? > WRT eliminating the distinction - that was dead and buried before > Racket began. There are no pure functional computer languages, and > there never will be: real programs have to interact with the impure > real world. Wait: you say the distinction is dead and buried, and then proceed to highlight it? Where would humanity be if we adopted the stance that we should never model anything just because our models can't be perfectly realized on a finite computer, or even worse, an analog machine? I didn't have a CS education, so maybe I just have a different perspective, however, I also haven't seen much evidence presented in this thread that the word "procedure" hurts anything. Why not stick with what seems to be an accurate term and avoid confusion down the line? > YMMV, > George PS: Thanks for the sparring. Think on this: we couldn't even have this conversation without the distinction. -- Anthony Carrico -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.