3 ms·
> Lisp has left the forefront of functional programming mostly to ML derived languages I'd be grateful if you could expand upon that statement. I'm a Lisper, a
by ced 16y ago
> Lisp has left the forefront of functional programming mostly to ML derived languages
I'd be grateful if you could expand upon that statement. I'm a Lisper, and half the time I see one of these Haskell articles, I wonder if there really is a there there. For sure, functional programming can be a whole lot better than CL or Scheme, but I'd like to know if the difference is significant.
- eru 16y agoDepends on what you want to achieve. If you leave out the dimension of static vs dynamic typing, you could get most of Haskell's benefits by making your Scheme pure, and confining side-effects. (Monads are one solution for this, but not the only one. Have a look at Functional reactive programming, or see how Clean uses linear typing.) You could probably hack most of the pureness stuff together with macros in an already existing Scheme. Purity by (strong) default makes it easier to combine your programs. Lazyness can help, too, but I am not completely sure whether you should make lazy the default. Chris Okasaki's "Purely Functional Data Structures" argues for needing both lazy and strict evaluation to guarantee asymptotic run times. Have a look at, say, Software Transactional Memory to see what purity can buy you. Combinatorial parsers are another interesting application in Haskell; however they should be easily implementable in Scheme, too. Please have a look at how http://www.cs.kent.ac.uk/people/staff/smk/redblack/rb.html http://www.cs.kent.ac.uk/people/staff/smk/redblack/rb.html uses the type system to statically guarantee the balance of red-black trees. Please pardon that I mostly talked about the `how' and not so much the `why'. I hope giving some examples might not totally be in vain.