Re: Does purely functional way requires static typing?



Slobodan Blazeski wrote:
On Mar 11, 8:32 pm, Pascal Costanza <p...@xxxxxxxxx> wrote:
Pertti Kellomäki wrote:
Slobodan Blazeski kirjoitti:
On Mar 10, 11:42 pm, Pertti Kellomäki <pertti.kellom...@xxxxxx> wrote:
Even when coming from
a functionalish language like Lisp, the purely functional way of
thinking does require some getting used to.
This is the only point we disagree too much, the rest of the post
we're pretty much Ok.
The problem is that you're mixing purely functional way with static
typing.
Yes, sloppy writing from my part. Should have written "SML-Haskell
style of functional thinking" or something like that.
Much of the power of functional programming comes from higher order
functions. If you throw in lazy evaluation, it would be pretty much
impossible to reason about functions that can have side-effects.
It is not purely coincidental that expressive type systems and
functional programming often go hand in hand. If you do a lot of
stuff using higher order functions, a type system is a very useful
tool for getting things right. Compared to typical Haskell code,
the use of higher order functions in CL is usually fairly "shallow".
Things like map or apply that are conceptually simple.
If you take a look at the current functional programming landscape,
you would be hard pressed to find many languages that do not have
static typing.
Scheme?

Multiparadigm. Remember that set! thingy.

The functional programming landscape doesn't consist only of pure functional languages. It's true that higher-order functions are not used a lot in Common Lisp, but in Scheme it's a much more common practice.

Pascal

--
1st European Lisp Symposium (ELS'08)
http://prog.vub.ac.be/~pcostanza/els08/

My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages