On Wed, Sep 21, 2005 at 12:12:16PM +0100, Immanuel Litzroth wrote: > "Tomasz Zielonka" <[EMAIL PROTECTED]> writes: > > > On Wed, Sep 21, 2005 at 08:53:47AM +0100, Immanuel Litzroth wrote: > >> "David F. Place" <[EMAIL PROTECTED]> 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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe