# dsl


11/08/2020, 6:13 AM
I am fairly new with Kotlin, but I am interested in building a potential DSL. Most of the talks I have seen with creating DSL focus on transforming existing code to a DSL structure, but I am looking at starting from scratch with no existing code. Are there some good talks focused on that and how to start a dsl from scratch?


11/08/2020, 4:24 PM
I actually asked a pretty similar question a while ago, here’s the thread:
a year later I’d say that those talks weren’t really for me, but I’d probably tell you just not to overthink it. Just start prototyping what you think you want your DSL to look like and wire it up with the necessary functions and data classes. You’ll discover things you like and dislike about your initial design and be able to use the fundamentals covered in the talks to iterate and improve things you think are awkward or unnecessary
👍 1
additionally, though this isn’t a talk, I think the kotlinx.html DSL was a great help for me to see how all sorts of neat language tricks were implemented

Matteo Mirk

11/09/2020, 10:07 AM
This is a great talk where Venkat creates example DSLs from scratch

👍 2


11/09/2020, 2:44 PM
I can share an example. I have a cooking recipe DSL I have been working on, and it looks like this: and the usage is: It could use some work, but it should give you some ideas
👍 1