interpreter pattern if tab customer is_member()for item in tab itemsitem price item price nowlook at the stark contrast between the previous code snippet and the definition of the same rules in simple dsl for defining specials if tab contains pizzas on wednesdays cheapest one is free every day from : to : drinks are less all items are less for members we will not yet look at the interpretationwhich will come little later what want you to notice is how much more clearly the dsl communicates how the rules of the specials will be applied it is written in way that will make sense to business owner and will allow them to either affirm that it does indeed fit their intent or that mistake was made and corrections will be needed ambiguity is reducedand adding new rules or specials becomes more simple-- win on both counts advantages of dsls the level of understanding and communication with regards to the domain for which the dsl is created is greatly elevated domain experts can reason about the expression of both the problem and the solution in the dsl without their having software engineering background the development of business information systems can thus move from software developers to the domain experts this results in richermore accurate systems expressed in terms the experts being aided by the system can understand disadvantages of dsls before you head out and begin creating dsls for every problem domain you can dream ofremember that there is cost involved in learning dsleven if it makes sense for the domain experts someone new may understand what your dsl is expressingbut they will still need to learn the language implementation in order to be able to work with it the deeper and richer your dslthe more knowledge the domain expert needs to operate the languagewhich might have an impact on the number of people who will be