在读 DSLs in Action
DSL 的定义A DSL is a programming language that’s targeted at a specific problem; other programming languages that you use are more general purpose.
It contains the syntax and semantics that model concepts at the same level of abstraction that the problem domain offers.
Programs that you write using a DSL must have all the qualities that you expect to find in a program that you write in any other computer language.
A DSL needs to give youthe ability to design abstractions that form part of the domain.
In the same way that you can build a larger entity out of many smaller ones in the problem domain, a well-designed DSL gives you that flexibility of composition in the solution domain.
You should be able to compose DSL abstractions just like you compose your functionalities in the problem domain.引自第10页
每个程序都是一个从问题领域映射到解决方案领域的实现。 Every application that you design ...
DSL 和 GENERAL-PURPOSE PROGRAMMING LANGUAGE 不同的地方。 最重要的两点： A DSL is target...
怎样写一个好的 DSL ？ 恰当的抽象层次，面向用户的API，隐藏实现细节。 A DSL provides a di...