Metaprogramming in F#
Metaprogramming in F#?
One of the many things that has interested me in F# is that it was originally written as a language to write other languages. This of course leads me to a discussion of F# and metaprogramming. Is it a fit? There are a couple of links well worth visiting and then at a future date, we'll come back to the subject.
Before the links, most of the language oriented stuff comes from quotations. Quotations are a little block of code which turns a particular piece of code into an expression tree. This language tree can then be transformed, optimized and even compiled into different languages. There are two types of these quotations, raw and typed. Typed Quotations contain static typing information whereas the raw do not. For a good introduction to these, check out Tomas Petricek's post here.
- Leveraging Meta-Programming Components with F# - Don Syme
Talks about F# with Quotations and LINQ expressions for expressing metaprogramming in F#
- F# metaprogramming and classes - Tomas Petricek
Talks about Class Quotations and basic metaprogramming capabilities in F# and its limitations