What are functional languages?

Yesterday, Conal Elliott wrote on his blog that C is really a pure functional language called cpp that can be reduced to a monadic construct called C. Fortunately for us, there is alot of prior knowledge in reducing C into highly optimized machine code.

I would like to add that Make is also a pure functional language. It is a set of rules that can be reduced to a set of shell scripts, which unfortunately do not share the same optimizations. Fortunately, shell scripting lets you insert code in the form of a variable with some amazing metaprogramming consequences.

If you're on the fence about FP, it's really more pervasive than that silly academic language, Haskell.

2 flames:

Peter Berry zei

Actually, I was under the impression that make was a logic language. You specify things that have to be true, and if the RTS isn't satisfied that they are, it makes them true if it can.

Yankee zei

Yeah, actually, that's true.

Would be an interesting question, how do you phrase a logical language in a functional language and vica versa.

Btw, how have you been. Are you still in Swansea?