Creating DSLs in functional Kotlin by Sudipta Mukherjee at #FnConf18
Channel: ConfEngine
Date: 01/02/2019

Domain Specific Languages (or Libraries because embedded DSLs are just that) are already quite popular.

Modern languages have many useful language features that are conducive to create DSLs with more ease than ever before. Kotlin from JetBrains is a beautifully blended pragmatic programming language that packages many features from many programming languages. Kotlin also have infix operation which makes code written in a DSL made with Kotlin very easy to read (and therefore less error-prone).

In this demonstration, I shall show couple DSLs made from Kotlin

and will dissect the code LIVE to show audience how several language features in Kotlin (which sometimes requires playing with higher order functions) to develop these languages.

*A Unit Testing DSL (a DSL to simplify unit testing of Kotlin, Java Code) that our grand/m/pa can use.

-- All unit test frameworks serve the purpose but elegance is a different matter. A code that works, and a code that is elegant and works is art. In this example, audience will see how they can use several language features that Kotlin has to offer can be put together to create an elegant and expandable unit testing DSL.

* A DSL for Web Scraping and Transformation.

- - A special case of ETL, where Extraction happens from raw HTML, Transformation happens in memory using the DSL designed. and the Load happens by loading this data to a different schema/db/form/representation.

Details: https://confengine.com/functional-conf-2018/proposal/6468/creating-dsls-in-functional-kotlin

Conference: https://functionalconf.com