Home Page Icon
Home Page
Table of Contents for
Programming DSLs in Kotlin
Close
Programming DSLs in Kotlin
by
Programming DSLs in Kotlin
Acknowledgments
Preface
Who Is This Book For?
What’s in This Book?
Online Resources
1. Introduction
Focus on the Key Characteristics
Kotlin as a Host Language
Steps to Program DSLs
2. Exploit Fluency
Remove Noisy Syntax
Design for Fluency
Make Syntax Obvious
Use Conventions to Improve Fluency
3. Get Domain Specific
Use Domain-Specific Extension Functions
Create Extension Operators
Use Domain-Specific Operators
Use invoke to Remove Redundant Syntax
4. Provide Contexts
Provide Context for Variables
Design for Separate Implicit Contexts
Use the Default Lambda Parameter Name for Context
Use Multiple Contexts to Remove Ambiguity
Use Inner Classes to Share State Between Contexts
5. Manage Scope and Handle Errors
Leverage the Compiler
Leverage Type Checking
Restrict Scope of Functions
Control Scope with DslMarker
Proactively Handle Errors
6. Practice with Examples
Let’s Design a Builder
Devise Ways to Run DSLs from External Sources
Bibliography
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Programming DSLs in Kotlin
Next
Next Chapter
Acknowledgments
Table of Contents
Acknowledgments
Preface
Who Is This Book For?
What’s in This Book?
Online Resources
1.
Introduction
Focus on the Key Characteristics
Kotlin as a Host Language
Steps to Program DSLs
2.
Exploit Fluency
Remove Noisy Syntax
Design for Fluency
Make Syntax Obvious
Use Conventions to Improve Fluency
3.
Get Domain Specific
Use Domain-Specific Extension Functions
Create Extension Operators
Use Domain-Specific Operators
Use invoke to Remove Redundant Syntax
4.
Provide Contexts
Provide Context for Variables
Design for Separate Implicit Contexts
Use the Default Lambda Parameter Name for Context
Use Multiple Contexts to Remove Ambiguity
Use Inner Classes to Share State Between Contexts
5.
Manage Scope and Handle Errors
Leverage the Compiler
Leverage Type Checking
Restrict Scope of Functions
Control Scope with DslMarker
Proactively Handle Errors
6.
Practice with Examples
Let’s Design a Builder
Devise Ways to Run DSLs from External Sources
Bibliography
Copyright © 2021, The Pragmatic Bookshelf.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset