Atitit. Improve development efficiency and quality DSL (3) ---- Summary of DSL implementation methods
1. Pipeline abstraction 1
2. Layered abstraction (JSON, XML etc) 1
3. asynchronous abstraction promise 1
4. Ide code templete 1
5. Method chain (Stream interface .?? Pipeline abstraction ??) 1
6. Static factory method) and import 1
7. varargs 1
8. metaprogramming (Anno ??) 1
9. Easy-to-Read API 1
10. Method chain 1
11. Function Sequence 1
12. nested function 2
1. dsl2 created with nested Functions
13. Lambda expressions/closures 2
14. 2
15. Reference 2
1. Pipeline abstraction 2. Hierarchy abstraction (JSON, XML etc) 3. asynchronous abstraction promise4. ide code templete5. method chain (Stream interface .?? Pipeline abstraction ??) 6. Static factory method) and import7. varargs8. metaprogramming (Anno ??) 9. Easy to read api10. method chain 11. Function Sequence 12. nested functions 1. dsl created with nested Functions
The style of using nested functions in DSL varies. In this Chinese method, I will nest a function in the function to write my semantic model, as shown below:
1 2 3 4 |
Graph ( Edge (from ("A"), to ("B"), weight (12.3 ), Edge (from ("B"), to ("C"), weight (1, 10.5) ); |
Let all expression constructors be defined on static. We can use the static import method to create a DSL.
13. Lambda expressions/closures 14.
Author: old wow's paw attilax iron, email: [email protected]
Reprinted please indicate Source: http://blog.csdn.net/attilax
15. Reference
Atitit. Improved software development efficiency and quality --- essential and essential for implementing DSL 4gl in Java o725-attilax column-blog channel-csdn. net
Paip. Declarative Programming and DSL Summary-attilax column-blog channel-csdn. net
Paip. dsl programming language advantages and common DSL-attilax columns-blog channel-csdn. net
DSL is used in Java Development-linugb118 -- Java space-blogjava.htm
Atitit. Improve development efficiency -- Implement DSL in Java
New Thinking in API design: build internal DSL _ It addiction with smooth interfaces
Java 8 uses the Martin Fowler method to create an internal DSL-importnew
Atitit. Improve development efficiency and quality DSL (3) ---- Summary of DSL implementation methods