[Haskell] Re: [Haskell-cafe] Haskell versus Lisp

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Sep 21 16:47:23 EDT 2005


On Wed, Sep 21, 2005 at 12:12:16PM +0100, Immanuel Litzroth wrote:
> "Tomasz Zielonka" <tomasz.zielonka at gmail.com> writes:
> 
> > On Wed, Sep 21, 2005 at 08:53:47AM +0100, Immanuel Litzroth wrote:
> >> "David F. Place" <d at vidplace.com> writes:
> >> 
> >> >I was hoping that the examples I requested would be examples of
> >> >particular control constructs or extensions to the language's syntax
> >> >and semantics.  Though I admit that such things are possible in lisp,
> >> >I suspect that their utility is minimal.
> >> 
> >> Ever heard of the loop macro?
> >> Immanuel Litzroth
> >
> > I would be nice if you could give some examples for use of LOOP macro
> > that you think would be cumbersome to translate to Haskell.
> >
> That was not the original question and I think that would lead to
> pointless discussion about the meaning of "cumbersome".  

You are right, sorry. I agree that the ability to create your own
control structures is a win. I only argue that when it's possible, it's
better to avoid using macros for this.

> Another example is UFFI, basically a bunch of macros to do platform
> independent foreign function interfaces.

Good example - laziness, HOFs and closures don't help much here.

> I a currently writing a macro to generate the functions and
> datastructures to read an ipod database. This allows me to
> declaratively say
> (defheader (header-name inherits-from) 
>            (field-name length &optional reader)...).
> I doubt this would be easy in Haskell (maybe with TH it could be done) 

I am doing similar things with Haskell. The amount of TH code needed is
minimal, I prefer to put most of the machinery in the type system.

Best regards
Tomasz


More information about the Haskell-Cafe mailing list