Introducing Language-Oriented Programming

Don Syme, Ádám Gránicz, Antonio Cisternino · Apress eBooks · 2010

Chapters 3, 4, and 6 covered three well-known programming paradigms in F#: functional, imperative , and object-oriented programming. This chapter covers techniques and constructs related to what is essentially a fourth programming paradigm: language-oriented programming . The word language can have a number of meanings in this context. For example, take the simple language of arithmetic expressions and algebra that you learned in high-school mathematics, made up of named variables such as x and y and composite expressions such as x + y , xy , − x , and x 2 . For the purposes of this chapter, this language can have a number of manifestations: One or more concrete representations : for example, using an ASCII text format or an XML representation of arithmetic expressions. One or more abstract representations : for example, as F# values representing the normalized form of an arithmetic expression tree. One or more computational representations , either by functions that compute the values of arithmetic expressions or via other engines that perform analysis, interpretation, compilation, execution, or transformation on language fragments. These can be implemented in F#, in another .NET language, or in external engines. These 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.

Read the paper · More papers on PaperTik