Interpreter pattern
|
In computer programming, the interpreter pattern is a particular design pattern. The basic idea is to implement a specialized computer language to rapidly solve a defined class of problems. Specialized languages often let a problem be solved several to several hundred times more quickly than a general purpose language would permit.
One common example is the specilized database query languages such as SQL. Another example is that specialized computer languages are often used to describe communication protocols. Another is that most general-purpose computer languages actually incorporate several specialized languages: one to define data, one to define operations on the data, one to define when to perform the operations, and at least one to define how to translate the computer program to machine language.