Kotlin Fundamentals: Domain Specific Languages
This course will mature your understanding of Kotlin by helping you master DSL development. Once mastered you will understand Kotlin more completely and be able to write elegant language-like code.
What you'll learn
How do you create great APIs? One way is to make code that uses your API streamlined and intuitive to use. To do so, sometimes you need to create mini-languages within your Kotlin code. These are called Domain Specific Languages (DSLs). Designing and implementing DSLs requires thinking differently about your code and utilizing a suite of Kotlin features which make DSLs practical. In this course, Kotlin Fundamentals: Domain Specific Languages, you will learn the Kotlin features and implementation techniques for DSLs. First, you will learn what design criteria you should use to make a DSL. Next, you will put those design goals into action as you discover some DSL techniques for use in DSL implementations such as nested builders and context variables. Finally, as you implement some DSLs during the course, you will explore how to create clean structured DSLs containing lambdas, infix notation, and other language-like syntax. When you’re finished with this course, you will have the skills and knowledge of DSL implementations needed to build new DSLs, understand how to use existing ones, and even improve your non-DSL code.