Buscar en Mind w/o Soul

jueves, junio 19, 2008

Programación Orientada a Lenguajes

Cómo programar a base de crear sublenguajes específicos de dominio. Exctracto del libro Expert F#

Chris Smith's completely unique view
I will define what LOP is: Language Oriented Programming is a style of programming that tries to produce code that looks like it came from a Domain Specific Language but is still valid in a general purpose programming language.

The rest of this essay will provide examples of LOP in F# and how using LOP results in simpler code that better expresses the problem at hand. I’ll my examples along three major themes:

* Abstract Representation. Features in F# that allow you to represent domain-specific concepts in your F# code without needing to introduce a new layer of abstraction.
* Concrete Representation. Features in F# that allow you to describe your problem in another language and load that into F#.
* Computational Representation. Finally I’ll go into features in F# that enable you to write code to process concepts in some other language without resorting to a third, more specialized language.

No hay comentarios: