[Haskell-cafe] haskell and reflection

Reinier Lamers reinier.lamers at phil.uu.nl
Tue Sep 11 15:39:31 EDT 2007


Op 11-sep-2007, om 18:43 heeft Greg Meredith het volgende geschreven:
> Thanks for these comments. i wouldn't judge Haskell solely on the  
> basis of whether it embraced reflection as an organizing  
> computational principle or as a toolbox for programmers. Clearly,  
> you can get very far without it. And, it may be that higher-order  
> functional gives you enough of the 'programs that build programs'  
> capability that 80% of the practical benefits of reflection are  
> covered -- without having to take on the extra level of complexity  
> that reflection adds to typing. i was really just seeking information.
Template Haskell [1] is a system that lets you write programs that  
get executed at *compile time*, and that produce parts of the Haskell  
program to be compiled by manipulating a representation of the  
program as structured data. It's a form of reflection restricted to  
compile time, if you'd ask me.

Regards,
Reinier

[1] http://www.haskell.org/haskellwiki/Template_Haskell


More information about the Haskell-Cafe mailing list