[email protected]
[Top] [All Lists]

 On Thu, Dec 10, 2009 at 11:16 AM, John D. Earle wrote: Dear Gregg, Â You wrote, "Just think about how one reads a mathematical text - you need not actually compute subformulae or even analyze them logically in order to work with them." I hate to have to say this, but do you realize that algebra is concerned with functions among other things and it is the fact that these expressions are functions and not that they are algebraic that gives them this property? Hi John,I'd say algebra is mostly concerned with equalities and substitutions and doesn't much care about functions.Â The equation for a circle is not a function but that doesn't mean we can't use algebra to manipulate it.Â Algebras might use the concept of function but they are not necessarily _about_ functions.Â One could even argue that the lambda calculus isn't "about" functions - it's just a calculus, after all.Â Haskell goes by the rules of that calculus; whether the expressions involved denote functions is not relevant.Â The computer is just performs symbol calculus.Â Generally all formal semantics can be reduced to syntactic calculus as far as I can see. Â Functional programming is not a misnomer. It is called functional programming because you are quite literally working with functions.ÂExcept when you're not.Â IO operations are never functions, for example, so IO expressions never denote functions.Â FP languages do not (and cannot) eliminate the side effectful nature of such operations; the best they can do is what Haskell does, namely circumscribe them so that they are well-behaved and thus can be properly managed (algebraically).Â But that doesn't make them functions.Â So for me at least "algebraic" better describes how Haskell works; what you're working with is expressions and you reason about them algebraically.ÂÂ You can do this reliably not because everything is a function but because non-functions are well-behaved. Â Functions have a profound simplifying effect.No argument there.Â But the expressive power that comes with first-class functions is not what distinguishes Haskell et al. - lots of non-FP languages support them these days. The truth is as Haskell has demonstrated that much of the complexity in computer programming is artificial and doesn't need to be there. It makes having to prove correctness a lot easier, but that is not the only motivation behind Haskell and other functional programming languages. The push has been getting performance up to a point where the language may be regarded as respectable.Sure, but that's only possible because the properties of programs are provable, which is what makes it possible to reliably transform a program into an equivalent but more efficient form. -Gregg ```_______________________________________________ Haskell-Cafe mailing list [email protected]/* */ http://www.haskell.org/mailman/listinfo/haskell-cafe ```