Skip to content
Free planNo credit card requiredStart writing

book chapter · Apress eBooks · 2010

Metaprogramming

Chaur G. Wu

Cited by 0Abstract and details only

Abstract

Metaprogramming is everywhere in the DLR. All the LINQ Expression examples you saw in Chapter 2 and all the DLR Hosting API examples you saw in Chapter 6 are metaprograms. Because metaprogramming plays such a pervasive role in the DLR, we're going to dive deeper into the subject and show you some advanced and marvelous uses of metaprogramming. We will begin with an overview of metaprogramming. The overview will discuss what metaprogramming is and where it is used in the DLR, then we'll look at one type of metaprogramming that adds and removes methods or properties to or from a class or an instance of a class. We will illustrate the metaprogramming technique in Ruby and Python, then write some infrastructure code that enables us to use the same kind of metaprogramming technique in C# through the DLR. The infrastructure code will consist of two classes called ClassMetaObject and ExpandoClass.KeywordsExpression TreeInstance LevelCustomer ClassDynamic LanguageLambda ExpressionThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Cite this paper

APA 7

Wu, C. G. (2010). Metaprogramming. Apress eBooks, 185–210. https://doi.org/10.1007/978-1-4302-3067-0_8

MLA 9

Wu, Chaur G. “Metaprogramming.” Apress eBooks, 2010, pp. 185–210, https://doi.org/10.1007/978-1-4302-3067-0_8.

Chicago

Wu, Chaur G. 2010. “Metaprogramming.” Apress eBooks: 185–210. https://doi.org/10.1007/978-1-4302-3067-0_8.

Harvard

Wu, C.G. (2010) ‘Metaprogramming’, Apress eBooks, pp. 185–210. Available at: https://doi.org/10.1007/978-1-4302-3067-0_8.

BibTeX
@incollection{wu2010metaprogramming,
  title = {{Metaprogramming}},
  author = {Wu, Chaur G.},
  booktitle = {Apress eBooks},
  pages = {185--210},
  year = {2010},
  doi = {10.1007/978-1-4302-3067-0_8}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.