Re: Does purely functional way requires static typing?



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?


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

  • Re: Does purely functional way requires static typing?
    ... Much of the power of functional programming comes from higher order ... It is not purely coincidental that expressive type systems and ...
    (comp.lang.lisp)
  • Re: Does purely functional way requires static typing?
    ... Much of the power of functional programming comes from higher order ... In lisp, we could easily use them for data abstraction, but ... implemented most of our data structures to functions, ...
    (comp.lang.lisp)
  • Re: Does purely functional way requires static typing?
    ... Much of the power of functional programming comes from higher order ... a lot in Common Lisp, ...
    (comp.lang.lisp)
  • Re: Does purely functional way requires static typing?
    ... Much of the power of functional programming comes from higher order ... 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. ...
    (comp.lang.lisp)
  • Re: Learning lisp
    ... ??>> you do not consider lexical closures and CLOS being that important? ... lexical closures are absolutely essential for functional programming. ... dynamic variables that are used in Emacs Lisp are connected to ... but currently Common Lisp is aproximately as functional as lots of other ...
    (comp.lang.lisp)