[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's so cool about Scheme?
["Bayley, Alistair" <Alistair_Bayley@ldn.invesco.com>]
> (This are clearly my opinions... not necessarily shared by others on the
> > isn't functional programming just programming without side effects
> > ...
> > Or is the idea of higher-order programming [arbitrarily] bundled
> > into the idea of functional programming?
> Functional programming is a style, typified by the use of first-class
> functions, and higher-order functions (functions that take functions as
> arguments and apply them, and functions that return functions).
There's another reason that higher-order functions tend to go
hand-in-hand with functional languages, and it's a paradigmatic one.
Since functional languages are generally founded on the idea that
"everything is a function," we'd like them to be able to realize this
model. The locus classicus for this idea is, of course, lambda
calculus, in which one may model any traditional computing construct
using only functions, from the Church numerals on up. Naturally, all
these functions are higher-order and anonymous. So the natural
translation of lambda-calculus ideas to a practical language BEGINS
with higher-order anonymous functions, rather than ending there. It
is, in fact, the introduction of non-lambda binding constructs and
non-functional primitive data that is, in some sense, a perversion...
This is not so different from the object-oriented idea that everything
is be an object, or the older "von Neumann idea" that everything is a
mutable cell. It's just that in order for everything to be a function,
some of those functions need to be higher-order.
Also, higher-order functions are a joy to write and apply...
Matt Hellige email@example.com