Programming DSLs in Kotlin

Design Expressive and Robust Special Purpose Code



Bookstore > Books > Programming DSLs in Kotlin

Rating
AuthorVenkat Subramaniam
PublisherThe Pragmatic Programmers
Published2020
Pages50
LanguageEnglish
FormatPaper book / ebook (PDF)
ISBN-101680507931
ISBN-139781680507935
EBook Hardcover Paperback

Creating your own domain-specific languages (DSLs) is both challenging and exhilarating. DSLs give users a way to interact with your applications more effectively, and Kotlin is a fantastic language to serve as a host for internal DSLs, because it greatly reduces the pain and effort of design and development. But implementing DSLs on top of Kotlin requires understanding the key strengths of the language and knowing how to apply them appropriately. Learn to avoid the pitfalls and leverage the language while creating your own elegant, fluent, concise, and robust DSLs using Kotlin.

Internal DSLs remove the burdens of implementing a full blown language compiler. The host language quickly becomes your ally to creating DSLs, but the syntax you can choose for your DSLs is limited to what the host language allows. You can work around the limitations by tactfully bending the rules and exploiting the language capabilities. Learn the power of Kotlin and ways to design with it, in the context of crafting internal DSLs.

Start by learning ways to exploit the flexibilities of Kotlin to make your DSLs fluent, expressive, and concise. Then pick up techniques to extend the language with domain specific properties and functions. Quickly move ahead to tie your DSL snippets into the runtime environment and context of execution of your applications. Design to prevent any non-sensical syntax in your DSL that may otherwise be valid in the host language. Finally, learn techniques to gracefully handle errors. Practice using the multiple examples that are included in each chapter.

Fire up your editor and follow along each example to become proficient in designing and implementing your own internal DSLs using Kotlin.


  1. (10 books)



4 5 6

Similar Books


Hands-On Object-Oriented Programming with Kotlin

Hands-On Object-Oriented Programming with Kotlin

by Abid Khan, Igor Kucherenko

Kotlin is an object-oriented programming language. The book is based on the latest version of Kotlin. The book provides you with a thorough understanding of programming concepts, object-oriented programming techniques, and design patterns. It includes numerous examples, explanation of concepts and keynotes. Where possible, examples and pr...

Price:  $44.99  |  Publisher:  Packt Publishing  |  Release:  2018

Programming Algorithms in Lisp

Programming Algorithms in Lisp

by Vsevolod Domkin

Master algorithms programming using Lisp, including the most important data structures and algorithms. This book also covers the essential tools that help in the development of algorithmic code to give you all you need to enhance your code.Programming Algorithms in Lisp shows real-world engineering considerations and constraints that infl...

Price:  $27.73  |  Publisher:  Apress  |  Release:  2021

DSLs in Action

DSLs in Action

by Debasish Ghosh

Your success - and sanity - are closer at hand when you work at a higher level of abstraction, allowing your attention to be on the business problem rather than the details of the programming platform. Domain Specific Languages - "little languages" implemented on top of conventional programming languages - give you a way...

Price:  $25.00  |  Publisher:  Manning  |  Release:  2010

Programming Collective Intelligence

Programming Collective Intelligence

by Toby Segaran

Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the enormous amount of data created by people on the Internet. With the sophisticated algorithms in this book, you can write smart programs to ...

Price:  $11.00  |  Publisher:  O'Reilly Media  |  Release:  2007

Options and Derivatives Programming in C++20, 2nd Edition

Options and Derivatives Programming in C++20, 2nd Edition

by Carlos Oliveira

Master the features of C++ that are frequently used to write financial software for options and derivatives, including the STL, templates, functional programming, and numerical libraries. This book also covers new features introduced in C++20 and other recent standard releases: modules, concepts, spaceship operators, and smart pointers. Y...

Price:  $34.37  |  Publisher:  Apress  |  Release:  2020

Programming Kotlin

Programming Kotlin

by Venkat Subramaniam

Programmers don't just use Kotlin, they love it. Even Google has adopted it as a first-class language for Android development. With Kotlin, you can intermix imperative, functional, and object-oriented styles of programming and benefit from the approach that's most suitable for the problem at hand. Learn to use the many features of this hi...

Price:  $38.99  |  Publisher:  The Pragmatic Programmers  |  Release:  2019

Hands-On Functional Programming in Rust

Hands-On Functional Programming in Rust

by Andrew Johnson

Functional Programming allows developers to divide programs into smaller, reusable components that ease the creation, testing, and maintenance of software as a whole. Combined with the power of Rust, you can develop robust and scalable applications that fulfill modern day software requirements. This book will help you discover all the Rus...

Price:  $44.99  |  Publisher:  Packt Publishing  |  Release:  2018

Mastering High Performance with Kotlin

Mastering High Performance with Kotlin

by Igor Kucherenko

The ease with which we write applications has been increasing, but with it comes the need to address their performance. A balancing act between easily implementing complex applications and keeping their performance optimal is a present-day requirement In this book, we explore how to achieve this crucial balance, while developing and deplo...

Price:  $35.99  |  Publisher:  Packt Publishing  |  Release:  2018