ComputingComputer ScienceComputer SystemsCompilersProgramming LanguagesSystems ArchitectureApplication Programming InterfacesComponent-based Software EngineeringData-flow AnalysisIntermediate RepresentationSoftware ConstructionSoftware DesignMetaprogramming
Language-integrated meta-programming and extensible compilation have been recurring themes of programming languages since the invention of LISP. A recent real-world application of these techniques is the use of small meta-programs to specify database queries, as used in the Microsoft LINQ extensions for .NET. It is important that .NET languages such as F# are able to leverage the functionality provided by LINQ and related components for heterogeneous execution, both for pragmatic reasons and as a first step toward applying more disciplined, formal approaches to these problems. This paper explores the use of a modest meta-programming extension to F# to access and leverage the functionality of LINQ and other components. We do this by demonstrating an implementation of language integrated SQL queries using the LINQ/SQLMetal libraries. We also sketch two other applications: the execution of data-parallel quoted F# programs on a GPU via the Accelerator libraries, and dynamic native-code compilation via LINQ.
20
Template meta-programming for Haskell
Tim Sheard, Simon Peyton Jones · 2002 · 548 citations
Erik Meijer, Brian Beckman, Gavin Bierman · 2006 · 369 citations
Guarded recursive datatype constructors
Hongwei Xi, Chiyan Chen, Gang Chen · 2003 · 329 citations