Chapter 10. Interpreter Pattern
Whether you loved or hated math class, those concepts equipped you to be where you are now. Even as early as algebra, core ideas were absorbed preparing you for your programming career. Algebra revolves around using variables to hold unknowns. Substituting values into the equation provided an interpretation of the variables to obtain the final result. Programming languages, like PHP, provide another form of interpretation. PHP generally is referred to as an interpreted language because its core installation does not compile the code ahead of time. PHP has also been referred to as a templating language. As more elaborate applications are created, this templating and interpreting becomes more advanced. More often than not, this template approach exists to allow the team to create entities in a less technical and complex way. The Interpreter Design Pattern is made to review these entities and provide a replacement for or interpretation of them to that template.
Name: InterpreterThe Interpreter Design Pattern analyzes an entity for key elements and provides its own interpretation or action corresponding to each key. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access